Nordic nRF Command Line Tools¶
nRF Command Line Tools
To support interaction with Nordic’s nRF tooling during production, an SBC can be included in the PPC.
For example, to program the modem of an nRF9160DK using its built-in JLink programmer:
Sample Test Plan
title: Program nRF9160DK modem firmware
suite:
- title: Defines
steps:
- command: define FIRMWARE.zip "modem.zip"
- command: define SBC.uart "UART2"
- command: define SBC.vidpid "6666:8001"
- title: New SBC Session
steps:
- command: usb detect
id: "6666:8001"
- command: uartCfg %SBC.uart% 115200
id: "6666:8001"
- command: sleepms 500
- uartcmd: uart %SBC.uart%
send: "\x03\r\n\x03\r\n\x04\x04"
- uartcmd: uart %SBC.uart%
send: "\r\n\x04"
expect: "pltagent:PASS"
timeout: 30s
- title: Write firmware to ramdisk
steps:
- uartcmd: uart %SBC.uart%
send: "\r\npltagent-msc-present\r\n"
expect: "pltagent-msc-present:PASS"
timeout: 5s
- command: usb storage mount ramdisk
id: "6666:8001"
- command: usb storage write ramdisk %FIRMWARE.zip%
- command: usb storage unmount ramdisk
- uartcmd: uart %SBC.uart%
send: "\r\npltagent-msc-mount -forced_eject\r\n"
expect: "pltagent-msc-mount:PASS"
timeout: 5s
- title: Program nRF9160 modem with pynrfjprog
steps:
- uartcmd: uart %SBC.uart%
send: |
python3 prog-nrf9160-modem.py %FIRMWARE.zip%
expect: "Completed in"
timeout: 1m
References