Getting started on STM
This topic provides an overview of the STM platforms supported by Qt Quick Ultralite
Assuming that you have all the prerequisites installed, follow these instructions configure the Qt Creator IDE for STM boards:
To develop for MCUs using the Qt Creator IDE, the MCU plugin is required. The Qt online installer enables it by default when you install the Qt for MCUs SDK.
To enable or disable the plugin, follow these instructions:
- Select Help > About Plugins and choose the MCU Support plugin from the list.
- Restart Qt Creator to apply changes
To build and run your application on MCUs, you must create a kit:
- Select Edit > Preferences > Devices > MCU
- If not already set, provide the path to the Qt for MCUs installation directory.
- Select a Target supported by the Qt for MCUs SDK. For example, Qt for MCUs 2.3 - Desktop 32bpp.
- In the Requirements section, ensure that the platform-specific requirements are met.
- Select Automatically create kits for all available targets on start to create kits automatically.
Note: You could also manually create/remove kits using Create Kit and Remove Kit.
- Click Apply and restart Qt Creator if you choose to create kits automatically.
Note: The Automatically create kits for all available targets on start option is available from Qt Creator v4.14 onwards. On older versions of Qt Creator, you have to explictly create or remove kits using Create kit or Remove kit.
You could also set up the development environment from the command prompt. See Command-line Setup for STM Boards for more information.
Open the CMake project file for the example you want to build and configure it with the kit you created earlier. Once the project is configured, select Run or press Ctrl+r on your keyboard to build and flash the binary to the target.
This page uses
QUL_TOOLS in command line examples as if they were set as environment variables. For example:
export QUL_ROOT=$HOME/Qt/QtMCUs/2.3 export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.3 set QUL_TOOLS=C:\Qt\Tools\QtMCUs
- Open terminal window and run the following command:
ST-LINK_gdbserver -d -cp "<STM32_CUBE_PROG_INSTALL_PATH>/bin"
ST-LINK_gdbserver.exe -d -cp "<STM32_CUBE_PROG_INSTALL_PATH>\bin"
<STM32_CUBE_PROG_INSTALL_PATH>is the directory where you've installed the Cube Programmer tool.
GDB Server is now listening for TCP connections on the default port,
Note: Actual TCP port used by
ST-LINK_gdbserveris printed out on gdbserver's console.
arm-none-eabi-gdbin a separate console
- Connect to the target via the gdbserver in the
(gdb) target remote 127.0.0.1:61234
ST-LINK_gdbserver requires up-to-date ST-LINK firmware to be installed. If you see the following error:
Error in initializing ST-LINK device. Reason: ST-LINK firmware upgrade required.
you must upgrade the firmware to the latest version using the STM32CubeProgrammer tool.
If the problem persists after upgrade, retry with
ST-LINK Upgrade tool from the ST webpage ( Download ).
|Hardware board||MCU||Compiler||Operating system(s)|
|STM32F769I-DISCOVERY||STM32F769NI||GNU Arm GCC 10.3-2021.10, IAR Build Tools for Arm V9.20||Bare Metal, FreeRTOS|
|STM32H750B-DISCOVERY||STM32H750XB||GNU Arm GCC 10.3-2021.10, IAR Build Tools for Arm V9.20||Bare Metal|
|STM32F469I-DISCOVERY||STM32F469NI||GNU Arm GCC 10.3-2021.10, IAR Build Tools for Arm V9.20||Bare Metal|
By default, an application's resource data is copied to SDRAM on startup. In order to retain these resources in flash and not load them to RAM on startup, add the following CMake option to your CMake project file:
Alternatively, it can be enabled only for individual images like this:
set_source_files_properties( big/button.png PROPERTIES QUL_RESOURCE_CACHE_POLICY "NoCaching" )
Note: Set these CMake options before the qul_add_resource entry.
Note: Resources used for blending/blitting operations can be stored on the fast external flash if available, without copying them to RAM.
Available under certain Qt licenses.
Find out more.