7/27/2023 0 Comments Qt creator download linuxORIG_TOOLCHAIN_FILE = $TOOLCHAIN_DIR/OEToolchainConfig.cmake The Yocto SDK comes with a CMake toolchain file $ORIG_TOOLCHAIN_FILE, where TOOLCHAIN_DIR = $SDK_DIR_PATH/sysroots/x86_64-tdxsdk-linux/usr/share/cmake/ To run the Qt application on the device, you adapt the deployment and run settings as described in my post Cross-Compiling Qt Embedded Applications with QtCreator and CMake. You are now able to cross-build your Qt application against the Yocto SDK. I have described the setup of a device in detail in my post Docker Builds from QtCreator. You can test your setup by pressing the Test button. Go to Tools | Options | Devices, select the Device Goldfinger, press the Create | New for Private key file and press the Deploy Public Key button. One manual post-processing step is required: creating and deploying a public key on the device. If you want to change the disabled configurations, you must clone them. You can inspect these configurations by clicking through the tab pages. QtCreator auto-detected the configurations for the Device Goldfinger, the sysroot, the C compiler GCC (Goldfinger), the C compiler (Goldfinger), the debugger GDB Goldfinger, the Qt version Goldfinger, the CMake tool CMake Goldfinger, the CMake generator and the CMake configuration. When you open the dialog Tools | Options | Kits | Kits, you’ll see the new auto-detected kit Goldfinger. When started, QtCreator merges these configuration files with their counterparts in $HOME/.config/QtProject/qtcreator. The script also generates a couple of QtCreator configuration files – profiles.xml, qtversion.xml, toolchain.xml, debuggers.xml, cmaketools.xml and devices.xml – in the directory $QT_CREATOR_DIR_PATH/share/qtcreator/QtProject/qtcreator OEQt5Toolchain.cmake fixes a long-standing bug in the CMake files of the Qt libraries. Goldfinger.cmake is a normal CMake toolchain file and sets the variables for the C compiler, the linker and the system root among others. The script generates two CMake toolchain files – Goldfinger.cmake and OEQt5Toolchain.cmake – in the directory $SDK_DIR_PATH/sysroots/x86_64-tdxsdk-linux/usr/share/cmake/ creator-base $QT_CREATOR_DIR_PATH -device $DEVICE Once set up, QtCreator will deploy the Qt application to $DEVICE and run it on the $DEVICE.Ĭlose QtCreator and call the script configure-qtcreator.sh: $ configure-qtcreator.sh -name $NAME -env-setup $ENV_SETUP_FILE_PATH \ Should allow you to log in to the target device. $DEVICE ( verdin-imx8mm.local for me) is the name or IP address of the device, on which the Qt application will be running. My settings are QT_CREATOR_DIR_PATH = /home/burkhard/Qt/Qt5.15.2/Tools/QtCreator The QtCreator version, for which you generate the configuration files, is located in $QT_CREATOR_DIR_PATH, which contains the subdirectories bin and libexec. My settings look as follows: SDK_DIR_PATH = /private/Projects/Spectre/verdin-dunfell/sdkĮNV_SETUP_FILE_PATH = $SDK_DIR_PATH/environment-setup-aarch64-tdx-linux The Yocto SDK is installed in $SDK_DIR_PATH and contains the environment setup file, which sets Linux environment variables like OECORE_*, CXX and CXXFLAGS needed for cross-compilation against the SDK. QtCreator uses this name to mark the compiler, Qt version, debugger, CMake version and device as belonging to this kit. The script works for any SDK built with Yocto. The script generates the Qt Creator configuration files, which QtCreator displays in the dialog Tools | Options | Kits. $ chmod a x $HOME/bin/configure-qtcreator.sh In the unlikely event that you must use older versions, I explain a workaround in my post Deploying Qt Projects to Embedded Devices with CMake.ĭownload the script configure-qtcreator.sh, install it in a directory from $PATH and make it executable. Using the latest QtCreator and CMake versions has never caused me any problems. You should use a QtCreator version not older than 4.11 and a CMake version not older than 3.14. You can log into the board with SSH using a username and password. For this post, I built the SDK for the reference image tdx-reference-multimedia-image of the Verdin i.MX8M Mini board from Toradex. You have built a Linux image and an SDK for an embedded device with Yocto. The script in this post is the first time that (L)GPLv3 users of Qt can enjoy the same convenience. Users of the commercial Qt for Device Creation license have been enjoying this fast and proper QtCreator setup for several years now. I can cross-compile the Qt application for my embedded device and run the Qt application on the device with one button press in QtCreator. The last two times took me 5 minutes – using the script presented in this post. The next half a dozen times took me 4 hours on average. Setting up QtCreator for cross-compilation with CMake took me 15-20 hours the first two or three times.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |