| This version of X-LINUX-QT expansion package is compatible with ecosystem release v7.0.0 |
This article explains how to use the X-LINUX-QT developer package to build Qt applications for the STM32 microprocessor series. It has been written for STM32MP2 series but it can be adapted easily to STM32MP1 series.
The validation and snapshots of this article have been made with previous X-LINUX-QT expansion package version, but can be easily translated to other releases.
1. Prerequisites[edit | edit source]
Check first, detailed prerequisites in X-LINUX-QT_expansion_package#Prerequisites and X-LINUX-QT Developer Package#Prerequisites.
The Qt™ Creator[1] tool is used to build, debug and run applications demos on target.
The X-LINUX-QT developer package is up and running on your board. For that, follow information provided in X-LINUX-QT Developer Package article.
2. Install the Qt Creator[edit | edit source]
- The Qt™ Creator can be downloaded and installed following this link.
- The Qt™ online installer can be downloaded following this link.
3. Create and configure a new STM32MPU Kit[edit | edit source]
This new STM32MPU Kit must be created and configured manually. Please refer to Qt documentation: https://doc.qt.io/qtcreator/creator-preferences-kits.html
4. Select the Qt project example[edit | edit source]
| Qt6 6.11.2 must be installed in order to have the list of examples for that Qt version. |
Once the Qt™ Creator is launched and the Welcome to Qt™ Creator is displayed:
- Go to the
Examplesfrom the list on the left, - Then select the new Qt6 6.11.2 from the dropdown list.
The supported examples are then displayed.
- Search for a specific example in the
Search barin front of the selected kit. - Select the example you are looking for (just a simple click on it).
- Close the "Help window" if not needed.
5. Configure the project example[edit | edit source]
- Make sure that the new STM32MPU kit added is selected
- Press the
Configure Projectbutton:
- Make sure all configuration steps are successfully done (green bars):
6. Running configuration for the STM32MPU Kit[edit | edit source]
- Select the
Configure Projectbutton from the vertical bar on the left. - Select the new Kit added.
- Select
Run Settings. - On the right panel, scroll down till the
Environmentsection. - Press the
Detailsbutton. - Add the below environment variables:
XDG_RUNTIME_DIR=/run/user/1000 QT_QPA_PLATFORM=wayland QT_VULKAN_LIB=/usr/lib/libvulkan.so.1
7. Build and run the project[edit | edit source]
- Make sure that the board is connected to the host machine via the USB DRD TypeC connector. for that, follow the instructions from the X-LINUX-QT expansion package#Hardware prerequisites section and check how to get your board connected to the host machine.
- Once in the
Run Settingpanel, the notice below should not appear at the bottom of the screen.
- Press the
Runbutton from the vertical bar on the left to build, deploy and run the selected example on the connected board.
- If everything went well, then the example will be running on the connected board.