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:

  1. Click Tools > Options.

  2. Select Devices from the list at the left.

  3. Click Add on the right panel. A new dialog is displayed listing all the available device configuration types.

  4. Select Generic Linux Device and click Start Wizard.

  5. Complete the Device Connection wizard:

    1. Device configuration name.

    2. 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.
    3. User name used to login in the device; the default value is root.

    4. The authentication type; use Password.

    5. The password used to log in to the device; leave it empty by default.

  6. Click Next.

  7. In the Summary page, click Finish to create the new device configuration.

  8. 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.
  9. Click OK to save the new created device configuration and close the dialog.

Set up DEY compilers

Configure DEY Qt Compiler

Follow these steps to configure the Digi Embedded Yocto Qt compiler:

  1. Click Tools > Options.

  2. Select Build & Run from the list at the left.

  3. In the right pane, select the Qt Versions tab.

  4. Click Add to add a new Qt compiler.

  5. 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
  6. 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 DEY C Compiler

Follow these steps to configure the Digi Embedded Yocto C compiler:

  1. Click Tools > Options.

  2. Select Build & Run from the list at the left.

  3. In the right pane, select the Compilers tab.

  4. Click Add and select GCC > C from the drop-down menu to add a new C native compiler.

  5. Enter a name to identify the new C compiler, for example <PLATFORM>_DEY_GCC.

  6. Click Browse to fill the C compiler path. A file system explorer dialog opens.

  7. Navigate through your file system and select the aarch64-dey-linux-gcc binary installed within your platform toolchain, usually located at:

    <toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/aarch64-dey-linux/aarch64-dey-linux-gcc
  8. Select arm-linux-generic-elf-32bit from the ABI drop-down.

  9. Click Apply to save the new C compiler.

Configure DEY C++ compiler

Follow these steps to configure the Digi Embedded Yocto C++ compiler:

  1. Click Tools > Options.

  2. Select Build & Run from the list at the left.

  3. In the right pane, select the Compilers tab.

  4. Click Add and select GCC > C++ from the drop-down menu to add a new C++ native compiler.

  5. Enter a name to identify the new C++ compiler, for example <PLATFORM>_DEY_G++.

  6. Click Browse to fill the C++ compiler path. A file system explorer dialog opens.

  7. Navigate through your file system and select the aarch64-dey-linux-g++ binary installed within your platform toolchain, usually located at:

    <toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/aarch64-dey-linux/aarch64-dey-linux-g++
  8. Select arm-linux-generic-elf-32bit from the ABI drop-down.

  9. Click Apply to save the new C++ compiler.

Set up DEY debugger

Follow these steps to configure the Digi Embedded Yocto debugger:

  1. Click Tools > Options.

  2. Select Build & Run from the list at the left.

  3. In the right pane, select the Debuggers tab.

  4. Click Add in the right pane to add a new debugger.

  5. Enter a name to identify the new debugger, for example <PLATFORM>_DEY_GDB.

  6. Click Browse to fill the debugger path. A file system explorer dialog opens.

  7. Navigate through your file system and select the aarch64-dey-linux-gdb binary installed within your platform toolchain, usually located at:

    <toolchain_installation_path>/sysroots/x86_64-deysdk-linux/usr/bin/aarch64-dey-linux/aarch64-dey-linux-gdb
  8. Click Apply to save the new debugger.

Create a new Kit configuration

Follow these steps to create a new Kit configuration for your device:

  1. Click Tools > Options.

  2. Select Build & Run from the list at the left.

  3. In the right pane, select the Kits tab.

  4. Click Add to create a new Kit configuration.

  5. Enter a name to identify the new Kit configuration, for example <PLATFORM>_DEY.

  6. In the Device type field, select Generic Linux Device.

  7. In the Device field, select the previously created device configuration.

  8. Fill the Sysroot path. To do so:

    1. Click Browse.

    2. Navigate through your file system and select the aarch64-dey-linux folder within your platform toolchain, usually located at:

      <toolchain_installation_path>/sysroots/aarch64-dey-linux/
  9. In the C Compiler field, select the previously configured C DEY Compiler.

  10. In the C++ Compiler field, select the previously configured C++ DEY Compiler.

  11. In the Debugger field, select the previously configured DEY Debugger.

  12. In the Qt Version field, select the previously configured Qt DEY Compiler.

  13. Fill the Qt mkspec field with your toolchain Qt mkspec path, usually located at:

    <toolchain_installation_path>/sysroots/aarch64-dey-linux/usr/lib/mkspecs/linux-oe-g++
  14. 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.

  15. Click Make Default to set the new Build & Run configuration as default.

  16. 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      Link encap:Ethernet  HWaddr 00:FA:C0:00:24:01 
          inet addr:192.168.42.30  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::2fa:c0ff:fe00:2401%lo/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:719975 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61809 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:111965191 (106.7 MiB)  TX bytes:9871502 (9.4 MiB)
 
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:4569 (4.4 KiB)  TX bytes:4569 (4.4 KiB)
 
wlan0     Link encap:Ethernet  HWaddr 00:FA:C0:00:24:02 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:9D:98:A6:37 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 00:40:9D:98:A6:36 
          inet addr:192.168.42.30  Bcast:10.101.2.255  Mask:255.255.255.0
          inet6 addr: fe80::240:9dff:fe98:a636%lo/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1360759 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172594 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:163158464 (155.5 MiB)  TX bytes:29408643 (28.0 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:1581 (1.5 KiB)  TX bytes:1581 (1.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:40:9D:98:A6:38 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

In this example, the target IP address is 192.168.42.30.