Last edited one month ago

X-LINUX-QT How To build Qt applications using Qt Creator

Applicable for STM32MP25x lines

This article aims to give the following information:

  • How to use the X-LINUX-QT Developer Package to build Qt applications for the STM32 microprocessor series.
1. Prerequisites[edit | edit source]

Check detailed prerequisites here.

The Qt™ Creator[1] tool is used to build, debug and run applications demos on target.

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 dowloaded cliking on this link
  • Installing the X-LINUX-QT Developer Package configures also the new STM32MPU Kit for the already installed Qt™ Creator IDE.
3. Select the new Kit installed by the X-LINUX-QT Developer Package[edit | edit source]
Info white.png Information
Qt6 6.5.3 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 Examples from the list on the left ,
  • Then select the new Qt6 6.5.3 from the dropdown list.

The supported examples are then displayed.

Qt™ Creator Welcome Screen - Qt 6.5.3 Examples
4. Select the project example[edit | edit source]
  • You may search for a specific example in the Search bar in front of the selected Kit
  • Select the example you are looking for (just a simple click on it)
Qt™ Creator Welcome Screen - Select the example
  • Close the Help window if not needed
Qt™ Creator Welcome Screen - The example's Help window
5. Configure the project example[edit | edit source]
  • Make sure the new added Kit by X-LINUX-QT Developer Package is selected
  • Press the Configure Project button
Qt™ Creator - Configure Project
  • Make sure all configuration steps are successfully done (Green Bars)
Qt™ Creator - Project Configuration Status
6. Configure the STM32 MPU Kit[edit | edit source]
  • Select the Configure Project button from the vertical bar on the left
  • Select the new Kit added by the X-LINUX-QT Developer Package
  • Select Run Settings
  • On the right panel, scroll down till the Environment section
  • Press the Details button
  • Add the below environment variables
XDG_RUNTIME_DIR=/run/user/1000
QT_QPA_PLATFORM=wayland
QT_VULKAN_LIB=/usr/lib/libvulkan.so.1
Qt™ Creator - Configure Run Settings
7. Build and run the project[edit | edit source]
  • Make sure your board is connected to your host machine via the USB DRD TypeC connector.
  • Follow instructions from the Hardware setup section and check how to get your board connected to your host machine.
  • Once in the Run Setting panel, you shouldn't have the below notice at the bottom of the screen.
Qt™ Creator - Run Project
  • Press the Run button from the vertical bar on the left
  • That will build, deploy and run the selected example on the connected board.
Qt™ Creator - Run Project
  • If everything went well, then the example will be running on the connected board.
The Quick Items example running on the target