C
Using the Qt Quick Ultralite Zephyr module on NXP IMXRT1060-EVKB
The Qt Quick Ultralite platform port for the NXP i.MX RT1060 EVKB is named mimxrt1060-evkb-zephyr, and it supports the Zephyr board target mimxrt1060_evk@B/mimxrt1062/qspi.
Compatible versions
The Qt Quick Ultralite Zephyr module is supported on Zephyr 4.4.0 on NXP i.MX RT1060 EVKB.
Prerequisites
- Qt Quick Ultralite 2.12.3
- Qt Quick Ultralite NXP i.MX RT1060 EVKB platform package
- NXP i.MX RT1060 EVKB
- RK043FN66HS-CTG or RK043FN02H-CT display shield
- Zephyr RTOS 4.4.0
- NXP MCUXpresso LinkServer, which is part of MCUXpresso IDE, or a Segger J-Link debug probe
Display configuration
Selecting the display shield
The platform port uses the RK043FN66HS-CTG shield by default. To build for the RK043FN02H-CT shield instead, pass it to west build with --shield:
west build -b mimxrt1060_evk@B/mimxrt1062/qspi app --shield rk043fn02h_ct
Pixel format
The platform port renders in 16-bit color depth.
Touch input
Touch input is delivered through the Zephyr input subsystem in synchronous mode. The platform port's qul_module.conf enables it with CONFIG_INPUT and CONFIG_INPUT_MODE_SYNCHRONOUS.
Memory configuration
The Qt Quick Ultralite dynamic allocations, such as the UI tree, image buffers, and font data, are served from the Zephyr kernel heap sized by CONFIG_HEAP_MEM_POOL_SIZE. The platform port's default configuration sets it to 10240000 bytes.
Building the application
For generic instructions on setting up and building an application, see Setting up a new application, Setting QUL_ROOT, and Building.
The Qt Quick Ultralite Zephyr module uses the Zephyr SDK by default and requires the Zephyr SDK variant of the metadata file. Set the metadata file through west build app -t menuconfig, or by setting CONFIG_QUL_PLATFORM_METADATA in app/prj.conf as follows:
CONFIG_QUL_PLATFORM_METADATA="/path/to/Qt/QtMCUs/2.12.3/platform/boards/nxp/mimxrt1060-evkb-zephyr/mimxrt1060-evkb-zephyr_zephyrsdk_16bpp_Linux_armgcc-metadata.json"
CONFIG_QUL_PLATFORM_METADATA="C:/Qt/QtMCUs/2.12.3/platform/boards/nxp/mimxrt1060-evkb-zephyr/mimxrt1060-evkb-zephyr_zephyrsdk_16bpp_Windows_armgcc-metadata.json"
When CONFIG_QUL_DEVICELINK is enabled, use the *-metadata-devicelink.json variant of the file.
Use mimxrt1060_evk@B/mimxrt1062/qspi as the board:
west build -b mimxrt1060_evk@B/mimxrt1062/qspi app
Required Kconfig options
The platform port ships a qul_module.conf file with the Kconfig settings that Qt Quick Ultralite requires. It is applied through EXTRA_CONF_FILE before Kconfig runs.
To provide the configuration from the application instead, set CONFIG_QUL_DEFAULT_CONF=n and add the options from the port's qul_module.conf to the application's prj.conf.
In the Qt Quick Ultralite installation, the file is at platform/boards/nxp/mimxrt1060-evkb-zephyr/qul_module.conf.
Building the Qt Quick Ultralite libraries
By default, Qt Quick Ultralite uses the prebuilt libraries from the installation, which are built in the MinSizeRel configuration. To build your own libraries for this board, run:
west build-qul-libs --board mimxrt1060_evk@B/mimxrt1062/qspi --build-type MinSizeRel
For the complete list of command-line options and for the required build order on a fresh workspace, see Building the Qt Quick Ultralite libraries.
DeviceLink
The platform port supports DeviceLink over lpuart1. Enabling CONFIG_QUL_DEVICELINK=y applies the platform port's devicelink.overlay and devicelink.conf, which select the UART and disable the Zephyr console so that Qt Quick Ultralite owns the UART exclusively.
Note: While DeviceLink is enabled, the Zephyr UART console is off, so printf output and console performance logging are unavailable.
For the generic instructions, see DeviceLink.
Flashing
Flash the built application with west, using NXP MCUXpresso LinkServer:
west flash --runner linkserver
Debugging
Zephyr supports debugging with west by either debugging directly or launching a debug server and connecting to it with a debugger. The steps below show how to run a debug server with west and how to connect to it using GNU Project Debugger (GDB).
Make the debug server (such as LinkServer) available in the PATH environment variable to enable debugging with west:
export PATH=$PATH:/path/to/debug_server
set PATH=%PATH%;C:\path\to\debug_server
Start a debug session:
west debug --runner linkserver
The command launches the debug server, loads the application, and connects the GDB that comes with the Zephyr SDK to it. To debug an application that is already running on the target, use west attach --runner linkserver.
To connect a debugger of your own instead, launch only the debug server:
west debugserver --runner linkserver
LinkServer sets up a TCP socket listening to port 3333, which you can connect with the GDB from the Zephyr SDK in another terminal:
cd build $ZEPHYR_SDK_INSTALL_DIR/gnu/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb -tui -ex "target remote localhost:3333" zephyr/zephyr.elf
cd build %ZEPHYR_SDK_INSTALL_DIR%\gnu\arm-zephyr-eabi\bin\arm-zephyr-eabi-gdb -tui -ex "target remote localhost:3333" zephyr\zephyr.elf
Available under certain Qt licenses.
Find out more.