C

Getting started on NXP (Linux)

Overview

This topic provides all the necessary information to get started on the NXP platforms supported by Qt Quick Ultralite.

Note: These instructions apply when you are working with NXP targets that run on Linux. For information on how to get started with NXP targets that run on BareMetal, FreeRTOS or Zephyr®, see Getting started on NXP (BareMetal and FreeRTOS) and Getting started on NXP (Zephyr).

Installing prerequisites

Make sure you have all the prerequisites installed before setting up the development environment.

Setting up the development environment

Configuring the Qt Creator IDE

For MCIMX93-EVK no additional Qt Creator IDE configuration is required. A kit with the name "Qt for MCUs 2.9.0 - IMX93-EVK-LINUX (ARMGCC)" is automatically created when installing the "NXP i.MX 93 11x11 LPDDR4X EVK" component with the Qt Maintenance Tool.

Setting up the target device

You need to set up the target device by following the Boot to Qt documentation before running Qt Quick Ultralite on target device.

For more information, see Installing Boot to Qt on the target device and Connecting the target device.

The newly flashed Boot to Qt image starts up the launcher application by default. You need to disable that before running Qt Quick Ultralite application on the device:

systemctl disable startupscreen
systemctl disable b2qt

The console blanking feature will disable the display output after 600 seconds by default even when a Qt Quick Ultralite application is running. Use the following commands to disable console blanking:

echo -ne "\033[9;0]" >> /etc/issue
echo -ne "\033[14;0]" >> /etc/issue

Reboot the board for the changes to take effect:

systemctl reboot

Building applications with prebuilt Qt Quick Ultralite libraries

Building applications using Qt Creator IDE

  1. Open the CMake project file for the example you want to build.
  2. In the Configure Project window:
    1. Select the appropriate kit. For example, Qt for MCUs 2.9.0 - IMX93-EVK-LINUX (ARMGCC).
    2. Select Configure Project.

{MCU project configuration}

Once the project is configured, select Run or press Ctrl+r on your keyboard to build and flash the binary to the target.

Building applications using the command prompt

The steps below illustrate how to build the minimal example for MCIMX93-EVK (Linux).

Set QUL_ROOT to the location of the Qt for MCUs package that is being used. Set BOOT2QT_DIR to the Boot2Qt installation directory, depending on which Boot2Qt version is being used. For example:

export QUL_ROOT=$HOME/Qt/QtMCUs/2.9.0
export BOOT2QT_DIR=$HOME/Qt/6.6.3/Boot2Qt
set QUL_ROOT=C:\Qt\QtMCUs\2.9.0
set BOOT2QT_DIR=C:\Qt\6.6.3\Boot2Qt
cd $QUL_ROOT/examples/minimal
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=$BOOT2QT_DIR/imx93-11x11-lpddr4x-evk/toolchain/sysroots/x86_64-pokysdk-linux/usr/lib/cmake/Qt6/qt.toolchain.cmake -DQT_TOOLCHAIN_INCLUDE_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/boot2qt.cmake -DQUL_PLATFORM=imx93-evk-linux
cmake --build .
cd %QUL_ROOT%\examples\minimal
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=%BOOT2QT_DIR%\imx93-11x11-lpddr4x-evk\toolchain\sysroots\x86_64-w64-mingw32\usr\lib\cmake\Qt6\qt.toolchain.cmake -DQT_TOOLCHAIN_INCLUDE_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\boot2qt.cmake -DQUL_PLATFORM=imx93-evk-linux
cmake --build .

For more information on how to use CMake with Qt Quick Ultralite when developing applications for NXP boards, see CMake manual for NXP boards.

Board-specific information

Tier 1: Reference Targets

Hardware boardMCUCompilerOperating system(s)
MIMXRT1050-EVKBMIMXRT1052DVL6BGNU Arm GCC 12.3.rel1, IAR Build Tools for Arm V9.40Bare Metal, FreeRTOS
MIMXRT1064-EVKMIMXRT1064DVL6AGNU Arm GCC 12.3.rel1, IAR Build Tools for Arm V9.40Bare Metal, FreeRTOS, Zephyr
MIMXRT1170-EVKBMIMXRT1176DVMAAGNU Arm GCC 12.3.rel1, IAR Build Tools for Arm V9.40FreeRTOS

Tier 2: Verified Targets

Hardware boardMCU / MPUCompilerOperating system(s)
MIMXRT1060-EVKBMIMXRT1060DVL6B MCUGNU Arm GCC 12.3.rel1, IAR Build Tools for Arm V9.40Bare Metal, Zephyr
MCIMX93-EVKi.MX 93 MPUGNU Arm GCC 12.3.rel1Linux

Resource cache policy

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 QmlProject option to your qmlproject file:

MCU.Config {
    resourceCachePolicy: "NoCaching"
}

Alternatively, it can be enabled only for individual images like this:

ImageFiles {
    files: [
        "big/button.png"
    ]
    MCU.resourceCachePolicy: "NoCaching"
}

Available under certain Qt licenses.
Find out more.