Before creating your first application using Qt Creator, you must configure the IDE to work with your platform and the Digi Embedded Yocto toolchain.
Create a new device configuration
Follow these steps to create a new device configuration:
-
Click Tools > Options.
-
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 Generic Linux Device and click Start Wizard.
-
Complete the Device Connection wizard:
-
Device configuration name.
-
Remote device IP address. See How to find the IP of your device.
Your device and your host machine must be in the same network. -
User name used to login in the device; the default value is root.
-
The authentication type; use Password.
-
The password used to log in to the device; leave it empty by default.
-
-
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.
Set up Digi Embedded Yocto compilers
Configure Digi Embedded Yocto Qt Compiler
Follow these steps to configure the Digi Embedded Yocto Qt compiler:
-
Click Tools > Options.
-
Select Build & Run from the list at the left.
-
In the right pane, select the Qt Versions tab.
-
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. |
Configure Digi Embedded Yocto C Compiler
Follow these steps to configure the Digi Embedded Yocto C compiler:
-
Click Tools > Options.
-
Select Build & Run 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 <PLATFORM>_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.
Configure Digi Embedded Yocto C++ compiler
Follow these steps to configure the Digi Embedded Yocto C++ compiler:
-
Click Tools > Options.
-
Select Build & Run 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 <PLATFORM>_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.
Set up Digi Embedded Yocto debugger
Follow these steps to configure the Digi Embedded Yocto debugger:
-
Click Tools > Options.
-
Select Build & Run 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 <PLATFORM>_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.
Create a new Kit configuration
Follow these steps to create a new Kit configuration for your device:
-
Click Tools > Options.
-
Select Build & Run 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 <PLATFORM>_DEY.
-
In the Device type field, select Generic 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 cortexa7t2hf-neon-dey-linux-gnueabi folder within your platform toolchain, usually located at:
<toolchain_installation_path>/sysroots/cortexa7t2hf-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/cortexa7t2hf-neon-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++
-
In the Cmake Tool field, select the auto-detected Cmake included in the sourced toolchain, usually located at <toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/cmake.
-
Click Make Default to set the new Build & Run 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.