Using a b2qt embedded QBSP in Qt Creator
Published on April 17, 2020
This guide will provide the steps to use a Yocto generated b2qt embedded QBSP within Qt Creator to simplify application development with Qt. More information on QBSPs can be found here. Qt defines a QBSP as follows: "A QBSP contains a cross-compilation toolchain that gets integrated into Qt Creator, and a device image that can be used to boot your device using Boot to Qt software stack." So essentially, when developing an application with Qt Creator using a QBSP, you will be able to run your app on the target hardware, which has the required BSP components + Qt libraries to support the application. Lets dive in!
Using b2qt embedded QBSP in Qt Creator
Please follow the steps below in order to get up and running using a b2qt embedded QBSP in Qt Creator for application development.1- Try or Buy Qt
Follow the below URL to Try or Buy Qt. Qt offers a 10 day evaluation license to get you started. https://www.qt.io/download After filling out the form, you will be emailed credentials and instructions on setting up your account and activating your license.2- Download Qt via online installer
The Qt online installer can be found via the downloads page in your account. The online installer provides everything you need to start Qt development:- Qt framework sources (all essential and add-on modules)
- Qt framework prebuilt binaries (for host platform and multiple target platforms)
- Commercial Qt add-ons for Qt framework
- Qt Creator IDE for host operating system
- Qt documentation
- Other useful tools & utilities (for example for easy deployment)
3- Run Online Installer
Run the online installer. After running, you should see the following window.![](https://boundarydevices.com/wp-content/uploads/2020/04/Qt_Setup.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Qt_Installation_Folder.png)
4- Select Components
After specifying the path, you will be taken to a window where you can select the components to install. It is here where you will select the Qt version to install and provide a pre-generated QBSP file. In this example, we will be using Qt version 5.15 for i.MX8MM Qt 5.15 is part of the preview release, so click the "Preview" Package Category and hit filter, then find Qt 5.15.0-beta3 under the Preview tab and select it![](https://boundarydevices.com/wp-content/uploads/2020/04/Qt_515_beta3_Preview_Dropdown.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Qt_Creator_515_and_QBSP_Selection.png)
5- Install Components
Agree to the License Agreement and Click Next again, then Click Install. The selected components will then install.![](https://boundarydevices.com/wp-content/uploads/2020/04/Install_Qt.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Complete_Qt_Wizard.png)
6- Flash Target Hardware
Qt Creator will launch, but before we do anything here, we must flash the target hardware with a Boot to Qt image. The latest 5.15.0 b2qt image and flashing instructions can be found here: https://boundarydevices.com/boot2qt-embedded-qt5-image-and-toolchain-zeus-release7- Configure a Device Kit
Before we can start developing and deploying applications, we must configure a device kit so you can deploy the application on the target hardware via Qt Creator. We will be doing this via ssh, so it is required that you connect the device to the same network as the PC that is running Qt Creator and obtain its IP address. After Qt Creator launches, navigate to Tools > Options > Kits.![](https://boundarydevices.com/wp-content/uploads/2020/04/Qt_Tools_Options_Kits.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Auto-Detected-Boundary-Device-Kit.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Devices_Tab_Qt_Creator.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Add_Device_Qt_Creator.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Device_Settings_Qt_Creator.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Device_Test_Success.png)
~$ echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="dbdb", TAG+="udev-acl", TAG+="uaccess"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules
Then, you can obtain the IP address as per the usb0 interface on the target hardware.
8- Compiling and Launching first Demo Application
In this example, we are going to be using the Basic Layouts Example, so search Basic Layouts in search bar.![](https://boundarydevices.com/wp-content/uploads/2020/04/Basic_Layouts_Example_Search.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Configure_Project.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Build_and_Run_App-1.png)
![](https://boundarydevices.com/wp-content/uploads/2020/04/Basic_Layouts_Example_Screenshot.png)