Before creating your first application using Qt Creator, you must configure the IDE to work with your platform and the Digi Embedded Yocto toolchain.
1. Create a new device configuration
Follow these steps to create a new device configuration:
-
Click Edit > Preferences.
-
Select Devices from the list at the left.
-
Click Add on the right panel. A new dialog is displayed listing all the available device configuration types.
-
Select Remote Linux Device and click Start Wizard.
-
Complete the New Remote Linux Device Configuration Setup wizard:
-
In the Connection page:
-
Enter a name to identify this configuration.
-
Enter your device’s host name or IP address. See How to find the IP of your device.
Your device and your host machine must be in the same network. -
Enter the device’s SSH port number; the default value is 22.
-
Enter the username used to log in to the device; the default value is root.
-
Click Next.
-
-
In the Key Deployment page:
-
Configure the private key file.
-
Click Next.
-
-
In the Summary page, click Finish to create the new device configuration. A connection test is performed against the device. Once it finishes, click Close.
If the connection test fails, verify all the connection settings are correctly configured and the device is running properly.
-
-
Click OK to save the new created device configuration and close the dialog.
2. Set up Digi Embedded Yocto compilers
2.1. Configure Digi Embedded Yocto Qt Compiler
Follow these steps to configure the Digi Embedded Yocto Qt compiler:
-
Click Edit > Preferences.
-
Select Kits from the list at the left.
-
In the right pane, select the Qt Versions tab.
-
If your toolchain qmake binary is not listed, add it:
-
Click Add to add a new Qt compiler.
-
Navigate through your file system and select the qmake binary installed within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/qmake
-
-
Click Apply to save the new Qt compiler.
If you receive a warning message stating that there was already a configured binary for the same Qt version, ignore it and close the popup. |
2.2. Configure Digi Embedded Yocto C Compiler
Follow these steps to configure the Digi Embedded Yocto C compiler:
-
Click Edit > Preferences.
-
Select Kits from the list at the left.
-
In the right pane, select the Compilers tab.
-
Click Add and select GCC > C from the drop-down menu to add a new C native compiler.
-
Enter a name to identify the new C compiler, for example ccimx6qp_dey_gcc.
-
Click Browse to fill the C compiler path. A file system explorer dialog opens.
-
Navigate through your file system and select the arm-dey-linux-gnueabi-gcc binary installed within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-gcc
-
Select arm-linux-generic-elf-32bit from the ABI drop-down.
-
Click Apply to save the new C compiler.
2.3. Configure Digi Embedded Yocto C++ compiler
Follow these steps to configure the Digi Embedded Yocto C++ compiler:
-
Click Edit > Preferences.
-
Select Kits from the list at the left.
-
In the right pane, select the Compilers tab.
-
Click Add and select GCC > C++ from the drop-down menu to add a new C++ native compiler.
-
Enter a name to identify the new C++ compiler, for example ccimx6qp_dey_g++.
-
Click Browse to fill the C++ compiler path. A file system explorer dialog opens.
-
Navigate through your file system and select the arm-dey-linux-gnueabi-g++ binary installed within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-g++
-
Select arm-linux-generic-elf-32bit from the ABI drop-down.
-
Click Apply to save the new C++ compiler.
2.4. Configure Digi Embedded Yocto CMake tool
Follow these steps to configure the Digi Embedded Yocto CMake tool:
-
Click Edit > Preferences.
-
Select CMake from the list at the left.
-
In the right pane, select the Tools tab.
-
Click Add to add a new CMake tool.
-
Enter a name to identify the new CMake tool, for example ccimx6qp_dey_cmake.
-
Click Browse to fill the CMake tool path. A file system explorer dialog opens.
-
Navigate through your file system and select the cmake binary installed within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/cmake
-
Click Apply to save the new CMake tool.
3. Set up Digi Embedded Yocto debugger
Follow these steps to configure the Digi Embedded Yocto debugger:
-
Click Edit > Preferences.
-
Select Kits from the list at the left.
-
In the right pane, select the Debuggers tab.
-
Click Add in the right pane to add a new debugger.
-
Enter a name to identify the new debugger, for example ccimx6qp_dey_gdb.
-
Click Browse to fill the debugger path. A file system explorer dialog opens.
-
Navigate through your file system and select the arm-dey-linux-gnueabi-gdb binary installed within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/arm-dey-linux-gnueabi/arm-dey-linux-gnueabi-gdb
-
Click Apply to save the new debugger.
4. Create a new Kit configuration
Follow these steps to create a new Kit configuration for your device:
-
Click Edit > Preferences.
-
Select Kits from the list at the left.
-
In the right pane, select the Kits tab.
-
Click Add to create a new Kit configuration.
-
Enter a name to identify the new Kit configuration, for example ccimx6qp_dey.
-
In the Device type field, select Remote Linux Device.
-
In the Device field, select the previously created device configuration.
-
Fill the Sysroot path. To do so:
-
Click Browse.
-
Navigate through your file system and select the cortexa9t2hf-neon-dey-linux-gnueabi folder within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/cortexa9t2hf-neon-dey-linux-gnueabi/
-
-
In the C Compiler field, select the previously configured C DEY Compiler.
-
In the C++ Compiler field, select the previously configured C++ DEY Compiler.
-
In the Debugger field, select the previously configured DEY Debugger.
-
In the Qt Version field, select the previously configured Qt DEY Compiler.
-
Fill the Qt mkspec field with your toolchain Qt mkspec path, usually located at:
<toolchain_installation_path>/sysroots/cortexa9t2hf-neon-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++
-
In the CMake Tool field, select the previously configured DEY CMake tool.
-
Click Make Default to set the new Kit configuration as default.
-
Click OK to save the new Kit configuration and close the dialog.
How to find the IP of your device
You can find the IP of your device with the ifconfig
command.
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:40:9D:98:A6:37
inet addr:192.168.42.30 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::211:22ff:fe33:2211%lo/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1071204 errors:0 dropped:0 overruns:0 frame:0
TX packets:81475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:119890110 (114.3 MiB) TX bytes:16714042 (15.9 MiB)
In this example, the target IP address is 192.168.42.30.