Using Qt Creator
What is the QT Creator
The Qt Creator is a cross-platform IDE to develop and debug Qt Applications. It can be used to directly deploy and debug applications on a SECO device.
Embedded Software Development Tools & Cross Platform IDE | Qt Creator
Install Linux
If you are not already working on a linux system, you have to set up such a system. You could do this via Virtual Box or via WSL (Windows Subsystem for Linux) for example. The installation is described in the following links:
By default, the installed Linux distribution in wsl will be Ubuntu. To list all available distributions you can use the command wsl --list --online
or wsl -l -o
. To install additional Linux distributions after the initial installation the command wsl --install -d <Distribution Name>
is used. You can switch between installed distributions with wsl --setdefault <Distribution Name>
.
This document was written using Ubuntu 24.04.
When using wsl commands inside a Linux/bash instead of a powershell/command prompt use wsl.exe instead of wsl.
You may also install build-essentials for providing gcc and make.
$ sudo apt install build-essential
Be sure that ssh is installed. Otherwise install it:
$ sudo apt install ssh
Install Qt Creator
Use following command to install Qt Creator:
$ sudo apt install qtcreator
Get and source the Yocto SDK
To build and debug qt applications on seco devices you have to install the appropriate SDK on your linux system. The SDK is available for download with every release, see Kirkstone
To install the SDK use following command:
The installer will ask you if you want to install the SDK into a subfolder in /opt. Supposed this is what you want press the y key. Example output:
After installing you have to source the SDK envirement like in the following example:
For all the following steps the SDK environment has to be sourced.
Start Qt Creator
After the installation of the qt creator, a startup script that is part of the SDK can be used to start the qtcreator development session.
When started in this way, only the IP address should need to be set .
Check Qt Creator settings
Open Edit → Preferences
The Kits tab should lock similar to following screenshot:
Get the ip address of your device and add the ip address to the Host name in the Devices tab. It is also important to set the checkmark Source /etc/profile and $HOME/.profile
.
If you want to use the debugger open the Debugger tab. In the GDB section add the following into the Additional Startup Commands box:
6. New Qt Creator project
Follow the following pictures to create a new Qt project.
Do not setup any version control system as shown in Qt Creator project version control setup image.
7. Run and Debug
To run your application on the device press the green arrow. Be sure target.path is /tmp/ in the .pro file.
If you use the debugger you may receive an error message. Add following lines to Projects → Run → Environment:
For more information about Qt Creator debugging consult the debugging part of the reference manual
If you want to stop the SECO demo application, select Projects → Build & Run → Run → Add Deploy Step and select Run custom remote command as shown in the image above.
Add command as shown as in the image above: