C

Flashing Instructions for NXP boards

Note: The instructions below are not relevant for the Linux target. For the Linux target, use Qt Creator or use the scp tool to copy the binaries to the target device.

Before flashing the demo image onto the NXP board, ensure that the MCUXpresso IDE is installed. For instructions, see Getting started on NXP (BareMetal and FreeRTOS).

QUL_ROOT and QUL_TOOLS are used in the command line examples below as if they were set as environment variables. For example:

export QUL_ROOT=$HOME/Qt/QtMCUs/2.9.0
export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.9.0
set QUL_TOOLS=C:\Qt\Tools\QtMCUs

For convenience, you can set an environment variable that points to the Redlink tool, which is part of the MCUXpresso IDE.

export REDLINK=$MCUXPRESSO_IDE_PATH/ide/LinkServer/binaries/crt_emu_cm_redlink
set REDLINK=%MCUXPRESSO_IDE_PATH%\ide\LinkServer\binaries\crt_emu_cm_redlink

Where, MCUXPRESSO_IDE_PATH is an environment variable pointing to the MCUXpresso IDE installation directory.

Note: In MCUXpresso IDE versions 11.8 and older the crt_emu_cm_redlink binary is installed to the IDE itself and can be accessed from <MCUXPRESSO_IDE_PATH>/ide/binaries/crt_emu_cm_redlink.

To flash the NXP board, connect a USB cable to it, open a terminal window and run these following command:

%REDLINK% --flash-load-exec "<PATH_TO_BINARY>\your_binary.elf" -p <PACKAGE_NAME> --ConnectScript <CONNECTION_SCRIPT_NAME> --flash-driver= -x %QUL_ROOT%\platform\boards\nxp\%BOARD_NAME%\cmake

If your board requires a reset script, additional argument is needed in the command.

%REDLINK% --flash-load-exec "<PATH_TO_BINARY>\your_binary.elf" -p <PACKAGE_NAME> --ConnectScript <CONNECTION_SCRIPT_NAME> --resetscript <RESET_SCRIPT_NAME> --flash-driver= -x %QUL_ROOT%\platform\boards\nxp\%BOARD_NAME%\cmake

Where, the values for <PACKAGE_NAME>, <CONNECTION_SCRIPT_NAME>, <BOARD_NAME> and <RESET_SCRIPT_NAME>, varies depending on the hardware used. The following table lists the different board-specific values:

PACKAGE_NAMECONNECTION_SCRIPT_NAMEBOARD_NAMERESET_SCRIPT_NAME
NXP i.MX RT1050-EVKBMIMXRT1052xxxxBRT1050_connect.scpmimxrt1050-evk-common-
NXP i.MX RT1060-EVKBMIMXRT1062xxxxBRT1060_connect.scpmimxrt1060-evkb-baremetal-
NXP i.MX RT1064-EVKMIMXRT1064xxxxART1064_connect.scpmimxrt1064-evk-common-
NXP i.MX RT1170-EVKBMIMXRT1176xxxxxRT1170_connect_M7_wake_M4.scpmimxrt1170-evkb-freertosRT1170_reset.scp

Note: The Redlink tool does not support flashing files in hex format. If you see the following error message, you probably tried to flash the wrong file:

Must set -load-base or --area with binary file

Note: You can also flash a target device from the arm-none-eabi-gdb console. For more information, refer to the Debugging section for the selected device.

Available under certain Qt licenses.
Find out more.