Command-line Setup for NXP Boards
Assuming that the prerequisites are installed, the following subsections provide instructions to set up your environment using the command line.
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.6 export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.6 set QUL_TOOLS=C:\Qt\Tools\QtMCUs
Configure the following CMake variables. For more information, see the CMake Manual.
|Set the |
Note: This CMake variable is intentionally mixed-case since it needs to match the package name.
|The platform name must indicate the board and the OS you want to target. It's a combination of the chosen board's name and the OS you are targeting. The platform name in the following example indicates that your target is |
Note: If you want to target another board or OS, refer to Supported platforms for more information.
|Absolute path to the FreeRTOS sources directory. It is required for FreeRTOS targets only. Refer to FreeRTOS platforms for more information about boards on FreeRTOS.|
-DFREERTOS_DIR=< FreeRTOS directory path >
|For example, set it to the Arm GCC toolchain configuration file.
|QUL_TARGET_TOOLCHAIN_DIR||QUL_TARGET_TOOLCHAIN_DIR cmake cache entry needs to be used to provide the location of the used toolchain.|
|QUL_BOARD_SDK_DIR||For example, set it to the MIMXRT1050-EVKB SDK install path|
|QUL_COLOR_DEPTH||The color depth supported by the platform you have chosen. For example, set it to 16-bit.|
Note: If this variable is not set, default color depth is used while configuring for the platform.
|MCUXPRESSO_IDE_PATH||Set the |
Flash targets are created if the NXP_Flash_tool is found under
Note: In a Qt Quick Ultralite project,
CMAKE_BUILD_TYPE is set to
MinSizeRel by default.
MinSizeRel is the build type used for the prebuilt platform libraries shipped with Qt Quick Ultralite. To change the build type (to
Release for example), invoke CMake with the
-DCMAKE_BUILD_TYPE=Release option. For more information, see CMAKE_BUILD_TYPE.
The following example commands are used to build the
minimal example for MIMXRT1050-EVK:
cd $QUL_ROOT/examples/minimal mkdir build cd build cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DQul_ROOT=$QUL_ROOT -DCMAKE_TOOLCHAIN_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/armgcc.cmake -DQUL_TARGET_TOOLCHAIN_DIR=$QUL_TOOLS/arm_gcc_10 -DQUL_BOARD_SDK_DIR=$QUL_TOOLS/NXP/SDK_2_14_0_EVKB-IMXRT1050 -DQUL_PLATFORM=MIMXRT1050-EVK-baremetal -DMCUXPRESSO_IDE_PATH=/path/to/the/MCUXpressoIDE cmake --build .
cd %QUL_ROOT%\examples\minimal mkdir build cd build cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DQul_ROOT=%QUL_ROOT% -DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_TARGET_TOOLCHAIN_DIR=%QUL_TOOLS%\arm_gcc_10 -DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\NXP\SDK_2_14_0_EVKB-IMXRT1050 -DQUL_PLATFORM=MIMXRT1050-EVK-baremetal -DMCUXPRESSO_IDE_PATH=C:\path\to\the\MCUXpressoIDE cmake --build .
Once you have successfully built the
minimal example application, use the following command to flash it:
cmake --build . --target flash_minimal
The same procedure applies to any other application.
Available under certain Qt licenses.
Find out more.