User Guide - dk6prog#

Warning

dk6prog is a prototype application and it is not tested. To be used at the user’s own risk.

This user’s guide describes how to use dk6prog application. DK6 Programmer Tools allows reading and programming flash memory of DK6 target devices (JN51xx, QN9090, K32W0xx). It’s a Python port of JN51xx Flash Programmer (https://www.nxp.com/docs/en/user-guide/JN-UG-3099.pdf).

Supported devices#

DK6 Board and all compatible modules https://www.nxp.com/products/wireless/multiprotocol-mcus/advanced-development-kit-for-k32w061-and-jn5189-88:IOTZTB-DK006

Backends#

dk6prog tools support four backends (drivers). PYFTDI backend, pure Python implementation of libFTDI. PYLIBFTDI backend, ctypes wrapper for libFTDI. FTD2XX backend, ctypes wrapper for D2XX. PYSERIAL backend for simple UART communication.

Jupyter example#

Visit Jupyter example DK6 Programming tool for more information and examples of usage.

Command line interface#

dk6prog#

Tool for reading and programming flash memory of DK6 target devices.

This is an experimental utility. Use with caution!

dk6prog [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

-v, --verbose#

Print more detailed information

-vv, --debug#

Display more debugging information.

--version#

Show the version and exit.

--help#

Show this message and exit.

-d, --device-id <device_id>#

DK6 Serial device ID, obtained by list command

-r, --baudrate <baudrate>#

Serial port baudrate. Default baud rate is 115200.

-b, --backend <backend>#

PYFTDI backend, pure Python implementation of libFTDI. PYLIBFTDI backend. Ctypes wrapper for libFTDI. FTD2XX backend. Ctypes wrapper for D2XX. PYSERIAL backend for simple UART

Options:

PYFTDI | PYLIBFTDI | FTD2xx | PYSERIAL

-n, --no-isp#

Do not send ISP sequence

erase#

Erase the memory.

Erase the content of memory at the given <ADDRESS>, for a specified <LENGTH>.

ADDRESS - starting address
LENGTH - count of bytes to be erased
MEMORY_ID - id of memory to erase (default: 0)
Available Memory IDs:
0 or ‘PFLASH’
1 or ‘pSECT’
2 or ‘pFlash’
3 or ‘Config’
4 or ‘EFUSE’
5 or ‘ROM’
6 or ‘RAM0’
7 or ‘RAM1’
dk6prog erase [OPTIONS] ADDRESS LENGTH [MEMORY_ID]

Options

-r, --relative#

Use address relative to memory base address

-v, --verify#

Verify that the data were erase using blank check command

Arguments

ADDRESS#

Required argument

LENGTH#

Required argument

MEMORY_ID#

Optional argument

info#

Prints the information about the connected device.

param ctx:

click Context

raises SPSDKError:

When the DEVICE ID is not specified

dk6prog info [OPTIONS]
isp#

Issues ISP sequence as defined in Driver interface.

dk6prog isp [OPTIONS]
listdev#

Prints the information about the connected devices.

DEVICE_ID identifier is a parameter used for identification of device in other commands.

dk6prog listdev [OPTIONS]
read#

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>.

ADDRESS - starting address
BYTE_COUNT - number of bytes to read
FILE - store result into this file, if not specified use stdout.
If needed specify MEMORY_ID argument, use ‘-’ instead name of file
to print to stdout.
MEMORY_ID - id of memory to read from (default: 0)
Available Memory IDs:
0 or ‘PFLASH’
1 or ‘pSECT’
2 or ‘pFlash’
3 or ‘Config’
4 or ‘EFUSE’
5 or ‘ROM’
6 or ‘RAM0’
7 or ‘RAM1’
dk6prog read [OPTIONS] ADDRESS LENGTH [MEMORY_ID]

Options

-o, --out-file <FILE>#

Save output to file

-h, --use-hexdump#

Use hexdump format

-r, --relative#

Use address relative to memory base address

Arguments

ADDRESS#

Required argument

LENGTH#

Required argument

MEMORY_ID#

Optional argument

write#

Write the memory.

Writes the data to memory.

ADDRESS - starting address
FILE - write the content of this file
LENGTH - if specified, load only first LENGTH number of bytes from file
HEX-DATA - string of hex values: {{112233}}, {{11 22 33}}
MEMORY_ID - id of memory to read from (default: 0)
Available Memory IDs:
0 or ‘PFLASH’
1 or ‘pSECT’
2 or ‘pFlash’
3 or ‘Config’
4 or ‘EFUSE’
5 or ‘ROM’
6 or ‘RAM0’
7 or ‘RAM1’
dk6prog write [OPTIONS] ADDRESS FILE[,BYTE_COUNT] | {{HEX-DATA}} [LENGTH]
              [MEMORY_ID]

Options

-r, --relative#

Use address relative to memory base address

Arguments

ADDRESS#

Required argument

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

Required argument

LENGTH#

Optional argument

MEMORY_ID#

Optional argument