User Guide - nxpdebugmbox

This user’s guide describes how to use nxpdebugmbox application.

Command line interface

nxpdebugmbox

Tool for working with Debug Mailbox.

nxpdebugmbox [OPTIONS] COMMAND [ARGS]...

Options

-i, --interface <interface>

Probe interface selection,if not specified, all available debug probe interfaces are used.

Options

pyocd | jlink | pemicro

-s, --serial-no <serial_no>

Debug probe hardware ID/serial number to select the probe in system.

-p, --protocol <VERSION>

Set the protocol version. Default is 1.0 (RSA). Available options are: 1.0, 1.1, 2.0, 2.1, 2.2

Options

1.0 | 1.1 | 2.0 | 2.1 | 2.2

-t, --timing <timing>

Time of extra delay after reset sequence, defaults to 1.0 second

-n, --no-reset

Omit reset of debug mailbox during initialization, default behavior is reset debug mailbox during initialization.

-o, --debug-probe-option <debug_probe_option>

This option could be used multiply to setup non-standard option for debug probe.

The example of use: -o KEY=VALUE

[jlink]:

[frequency]: Set the communication frequency in KHz, default is 100KHz

[pemicro]:

[frequency]: Set the communication frequency in Hz, default is 100_000Hz

--operation-timeout <operation_timeout>

Special option to change the standard operation timeout used for communication with debug mailbox. Default value is 1000ms.

-v, --verbose

Print more detailed information

-vv, --debug

Display more debugging information.

--version

Show the version and exit.

--help

Show this message and exit.

auth

Perform the Debug Authentication.

nxpdebugmbox auth [OPTIONS]

Options

-b, --beacon <beacon>

Authentication beacon

-c, --certificate <certificate>

Path to Debug Credentials.

-k, --key <key>

Path to DCK private key.

-n, --no-exit

When used, exit debug mailbox command is not executed after debug authentication.

blankauth

Debug Authentication for Blank Device.

nxpdebugmbox blankauth [OPTIONS]

Options

-f, --file <file>

Required Path to token file (string hex format).

-n, --no-exit

When used, exit debug mailbox command is not executed after debug authentication.

erase

Erase Flash.

nxpdebugmbox erase [OPTIONS]

exit

Exit DebugMailBox.

nxpdebugmbox exit [OPTIONS]

famode

Set Fault Analysis Mode.

nxpdebugmbox famode [OPTIONS]

Options

-m, --message <message>

Path to message file.

gendc

Generate debug certificate (DC).

PATH - path to dc file
nxpdebugmbox gendc [OPTIONS] PATH

Options

-c, --config <config>

Required Specify YAML credential config file.

-e, --elf2sb-config <elf2sb_config>

Specify Root Of Trust from configuration file used by elf2sb tool

--force

Force overwriting of an existing file. Create destination folder, if doesn’t exist already.

--plugin <plugin>

External python file containing a custom SignatureProvider implementation.

Arguments

PATH

Required argument

get-crp

Get CRP level.

nxpdebugmbox get-crp [OPTIONS]

get-template

Generate the template of Debug Credentials YML configuration file.

PATH - file name path to write template config file
nxpdebugmbox get-template [OPTIONS] PATH

Options

-f, --force

Force overwriting of an existing file. Create destination folder, if doesn’t exist already.

Arguments

PATH

Required argument

ispmode

Enter ISP Mode.

nxpdebugmbox ispmode [OPTIONS]

Options

-m, --mode <mode>

Required

read-memory

Reads the memory and writes it to the file or stdout.

Returns the contents of memory at the given <ADDRESS>, for a specified <BYTE_COUNT>. Data are read by 4 bytes at once and are store in little endian format! | ADDRESS - starting address | BYTE_COUNT - number of bytes to read | FILE - store result into this file, if not specified use stdout

nxpdebugmbox read-memory [OPTIONS] ADDRESS BYTE_COUNT FILE

Options

-h, --use-hexdump

Use hexdump format

Arguments

ADDRESS

Required argument

BYTE_COUNT

Required argument

FILE

Optional argument

reset

Reset MCU by DebugMailBox.

The reset command implemented in NXPDEBUGMBOX has two modes (option -h):

Reset by RESET REQUEST of debug mailbox that causes the reset of MCU by SYSRESET_REQ. The chip is reset, but the ROM code returns back the chip into debug mailbox handler (without -h/–hard-reset option).

Reset by external reset signal. This reset is done by asserting external reset signal over debug probe. After this reset type the chip behavior is same as after standard reset button on the board. (with -h/–hard-reset option)

nxpdebugmbox reset [OPTIONS]

Options

-h, --hard-reset

When used, the hardware reset is used instead of debug mailbox reset.

start

Start DebugMailBox.

nxpdebugmbox start [OPTIONS]

start-debug-session

Start debug session.

nxpdebugmbox start-debug-session [OPTIONS]

test-connection

Method just try if the device debug port is opened or not.

nxpdebugmbox test-connection [OPTIONS]

write-memory

Writes memory from a file or a hex-data.

Writes memory at <ADDRESS> from <FILE> or <HEX-DATA> Writes a provided buffer to a specified <BYTE_COUNT> in memory.

ADDRESS - starting address
FILE - write the content of this file
BYTE_COUNT - if specified, load only first BYTE_COUNT number of bytes from file
HEX-DATA - string of hex values: {{112233}}, {{11 22 33}}
- when using Jupyter notebook, use [[ ]] instead of {{ }}: eg. [[11 22 33]]
nxpdebugmbox write-memory [OPTIONS] ADDRESS FILE[,BYTE_COUNT] | {{HEX-DATA}}

Arguments

ADDRESS

Required argument

FILE[,BYTE_COUNT] | {{HEX-DATA}}

Required argument