The value of the option -qtcreator points to the directory path, which contains the QtCreator installation. For example, it assigns OE_CMAKE_TOOLCHAIN_FILE to CMAKE_TOOLCHAIN_FILE and CXX to CMAKE_CXX_COMPILER. The QtCreator configuration script sources the environment setup script and assigns the environment variables to their CMake counterparts. The value of the option -config is the file path to this environment setup script. To set environment variables like OECORE_TARGET_SYSROOT, OECORE_NATIVE_SYSROOT, OE_CMAKE_TOOLCHAIN_FILE, CXX and CXXFLAGS for cross-compilation. When we build an application against a Qt SDK, we must source a shell script like environment-setup-cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi We first quit QtCreator and then call the script: $ configure-qtcreator.sh -config \Ĭonfigured Qt Creator with new kit: RPi3-XXX For convenience, we copy the script to a directory contained in $PATH (e.g., $HOME/bin). As the script is available under GPLv3, we can use it like QtCreator or GCC. ![]() The crucial part of the easy setup with Qt Commercial is the script configure-qtcreator.sh. I was curious, how Qt Commercial made the setup so easy and what we could use for Qt LGPLv3. The integration of QtCreator, CMake and Yocto has been wanting for quite some time. In the beginning, it was more like 4-6 hours. Even after having set up many kits, I still spend 1-2 hours for defining a kit. This is in stark contrast to my normal experience with Qt LGPLv3. Using Qt Commercial was a real time saver. I could immediately build, run and deploy my example application (an Internet radio). When I started QtCreator after the installation, I was positively surprised by a complete and correct kit definition. So, I decided to use my Qt Commercial license for small businesses and to install the QBSP (Qt Board Support Package) for the Raspberry Pi 3B. When I prepared this post as a talk for Qt Day 2020, I was hard pressed for time. Nearly Automatic Configuration of QtCreator Kits In the unlikely event that we must fall back to older versions, my post Deploying Qt Projects to Embedded Devices with CMake explains a workaround. Actually, I am not aware of any reasons, why we cannot work with the latest released versions of QtCreator and CMake. ![]() We use QtCreator not older than version 4.11 and CMake not older than version 3.14. Hence, we need not enter a password every time we deploy the application to the device. In QtCreator, we have defined a Device so that we can log in the Raspberry Pi with SSH using public key authentication. ![]() We have built a Linux image and an SDK for an embedded device, e.g., a Raspberry Pi 3B. The fairly unknown script configure-qtcreator.sh from the Yocto layer meta-boot2qt automates most of the kit definition. QtCreator performs these steps in a breeze, because we spent quite some time to define a QtCreator Kit. QtCreator cross-compiles the application, deploys it to the device and runs it on the device. We change the code of our Qt application in QtCreator and press the Run button to try the changes on an embedded device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |