Qt Quick Ultralite FreeRTOS application build process is the same as when building on bare metal with some additions. FreeRTOS being a separate library, you can build and link it yourself or use the
is a helper used to unify OS needs for examples and demos. It configures Qt Quick Ultralite for the correct OS, compiles OS-specific files, such as FreeRTOS sources, and links them to the project.
is mainly for Qt Quick Ultralite examples and demos, it can be used in other projects. To use
, set one of these:
STM32F7_FREERTOS_DIR=<freertos_directory_path>for STM32F769I-DISCOVERY and STM32F7508-DISCOVERY
IMXRT1050_FREERTOS_DIR=<freertos_directory_path>for NXP IMXRT1050-EVKB
IMXRT1064_FREERTOS_DIR=<freertos_directory_path>for NXP IMXRT1064-EVK
must be a path to a directory, where the
directory, and FreeRTOS source files exist.
After setting the FreeRTOS directory, add the following line to your project's
Where, <app_name> is the name of your project's executable. This function sets up FreeRTOS for the project.
Now your project should build and link to FreeRTOS and the Qt Quick Ultralite library. If you want to change heap allocator or the Qt Quick Ultralite provided
Changing heap policies
Using custom FreeRTOSConfig.h
When building project that uses FreeRTOS without
, you must configure, compile, and link FreeRTOS to your project manually. For FreeRTOS building instructions, see
Creating a New FreeRTOS Project
Qt Quick Ultralite itself needs the following FreeRTOS headers and functions:
void *pvPortMalloc(size_t xSize)
void vPortFree(void *pv)
FreeRTOS includes different memory allocation implementations (see
FreeRTOS developer docs, Memory management
for more info about implementations). By default, Qt Quick Ultralite example application uses
, which “coalescences adjacent free blocks to avoid fragmentation. Includes absolute address placement option.” However, in some situations other custom implementation may be preferred over the ones provided by FreeRTOS. You can change the implementation by adding the following call your project's
set_property(TARGET <app_name> PROPERTY FREERTOS_HEAP_POLICY "<heap_implementation>")
is the name of your project executable and
is the name of the implementation without the filename extension. For example, if you want to use
, you must put
注意： The script expects to find the heap policy from FreeRTOS MemMang directory, where FreeRTOS’ memory manager implementations reside.
is a header file used to configure FreeRTOS while building the project.
is provided by the platform package.
CMake variable is used to determine the location of