C
Flashing Instructions for NXP boards
Before flashing the demo image onto the NXP board, ensure that the MCUXpresso IDE is installed. For instruction, see the Getting started on NXP page.
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.8.2 export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.8.2 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_NAME | CONNECTION_SCRIPT_NAME | BOARD_NAME | RESET_SCRIPT_NAME | |
---|---|---|---|---|
NXP i.MX RT1050-EVKB | MIMXRT1052xxxxB | RT1050_connect.scp | mimxrt1050-evk-common | - |
NXP i.MX RT1060-EVKB | MIMXRT1062xxxxB | RT1060_connect.scp | mimxrt1060-evkb-baremetal | - |
NXP i.MX RT1064-EVK | MIMXRT1064xxxxA | RT1064_connect.scp | mimxrt1064-evk-common | - |
NXP i.MX RT1170-EVKB | MIMXRT1176xxxxx | RT1170_connect_M7_wake_M4.scp | mimxrt1170-evkb-freertos | RT1170_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.