nRF Pynrfjprog Development tool

Simple Python interface for the nrfjprog DLL 

The nRF Pynrfjprog is a Python package providing a simple Python interface for the nrfjprog DLL.

The package provides Python bindings for the nrfjprog DLL and is an excellent tool to use in a Python application test environment. It gives you all the functionality needed for properly testing the functionality of the nRF51, nRF52, nRF53 and nRF91 Series devices.


Key Features
Windows 32/64
support
Linux
support
macOS
support
Python
Script support

Choose platform and version

Choose your Desktop platform and select version (latest released version recommended)

Selected version
10.24.0 All (Python)

Changelog:

10.24.0 All (Python)

Update bundled Segger installers and tarballs to v7.94e

10.24.1 All (Python)

<h1>HIGHLIGHTS:</h1>

<ul>

    <li>nrfjprogdll: Support new Modem FW bootloader filenames introduced in MFW v2.

    </li>

    <li>nrfjprogdll: Fix memory control parameter for NRFJPROG_write_u32 on nRF54.</li>

</ul>

10.23.5 All (Python)

Added support for nRF54L and nRF54H.

10.23.4 All (Python)

Fixed an issue related to trying to mark jlinkarm_nrf_worker as executable when running pynrfjprog inside an Ubuntu Docker image.

10.23.2 All (Python)

Changelog:

  • nrfjprogdll: Fixed an issue where worker processes would remain alive if the client process died unexpectedly.
  • nrfjprogdll: Added pin reset between recover attempts for nRF53.

10.23.1 All (Python)

Changelog:

  • nrfjprogdll: Fix an issue with silently failing to readback-protect devices with TrustZone
  • nrfjprogdll: Added missing define NRF9120_xxAA_REV3 to DllCommonDefinitions.h (needed for nRF9161).
  • pynrfjprog: Added missing define NRF9120_xxAA_REV3 to Parameters.py (needed for nRF9161).
  • nrfjprogexe: Fixed issue where parsing of "0x" prefix for hexadecimal arguments was case sensitive. Now both "0X" and "0x" prefixes are accepted.

10.23.0 All (Python)

Changelog:

  • Update bundled Segger installers and tarballs to v7.88j
  • Fixed an issue for nRF91 where an invalid write with the debugger triggered an SPU exception when closing the DLL. This would in some cases leave the device FW stuck in the SPU exception handler.

10.22.1 All (Python)

Changelog:

  • Keep bundled Segger installers and tar balls at v7.80c.
  • Added support for nRF9161.
  • (nrfjprogexe) Added support for hard and pin resets with --program.

10.18.1 All (Python)

Changelog:

  • Fix issue where nrfjprog.exe could not be executed on linux / macOS due to a missing library symbol. Introduced in 10.18.0.
  • Fixed issue where NRFJPROG_rtt_set_control_block_address had no effect. Introduced in 10.18.0.
  • pynrfjrpog: Add missing cpu register definitions from dllcommondefinitions to parameters.py.
  • added function read_cpu_architecture for getting architecture of currently selected processor.

10.18.0 All (Python)

Changelog:

  • Update bundled Segger installers and tar balls to v7.80c.
  • Linux release now targets GLIBC v2.31 and up. This means Ubuntu 20.04 or equivalent and newer is required.
  • Due to new asyncio dependencies, pynrfjprog no longer supports python 3.6.
  • Bugfixes for linux and windows installers.
  • Improve progress logging for nrfjprog library and cli.
  • Add support for asynchronous RTT handling using callbacks in C or AsyncIO in python.

10.17.3 All (Python)

SHA256: 97a274d6efe5e680595fab89eb0d0ff580158d400ef1a085f6488821d106ca6f

Changelog:

  • Fixed bug where NRFJPROG_read_cpu_register(), and NRFJPROG_write_cpu_register() would always fail.
  • Fixed bug where updating modem FW for nrf91 would always time out

10.16.0 All (Python)

SHA256: 168171bca972085cec6ea34894c7dd284a4e668f3a8a450660d4e0fc3a1268c8

Changelog:

  • Update bundled Segger installers and tar balls to v7.66a.
  • Fixed issue where NRFJPROG_erase_file did not erase external memory with qspi_erase_mode set to ERASE_PAGES.
  • Support new registers in read_cpu_register and write_cpu_register methods.
  • Fixed issue where pynrfjprog did not bundle the nrfdfu shared library.

10.15.4 All (Python)

SHA256: 9F71C5D71D1BDFD10E524D33573892C8149397FF6B9D030BB9D94E5EFF11303E

Changelog:

  • Fixed issue where NRF52833_xxAA_REV2 weren't correctly identified.
  • Fixed issue where the program to keep hardened ap-protect devices open after recover was not working as intended.
  • Now comes with Arm64 binaries
  • Fixed issue introduced in 10.15.3 where pynrjfprog did not install shared libraries for some architectures.

10.15.3 All (Python)

SHA256: 2D6DA8224C4B5452DA4CEDEA60CEA433AB5F076CB5D80E67E0588FA228E03BD9

Changelog:

  • Fixed issue where NRF52810_xxAA_REV3, NRF52811_xxAA_REV2, NRF52805_xxAA_REV2, and NRF52820_xxAA_REV3 weren't correctly identified.
  • Fixed issue where certain nrf52 devices weren't treated as having hardened ap-protect when identified as revision FUTURE.
  • Fixed bug where all log messages from different instances of the same API were written to the log files of all of the instances.

10.15.2 All (Python)

SHA256: 7D177F64990C1A9C8E3720EAAB2B3FEC106A1A5CCFD304E80869EF833310FFD5

Changelog:

  • Fixed issue where --program printed "Verified OK" even if no verification was requested.
  • Updated bundled modem UART DFU firmware for Thingy:91 board to "nrf9160_pca20035_firmware_upgrade_app_0.1.1.hex". The update fixes a compatibility issue where the app would not work with bootloaders built with NCS 1.5.0 and newer.

10.15.1 All (Python)

Main changes in this version

  • Update bundled Segger installers and tar balls to v7.58b.
  • Fixed issue where a simultaneous –recover and –program would fail if device was protected.
  • Fixed issue where some error messages would display the chosen coprocessor as a number instead of a string.
  • Fixed wrong values displayed in error log message after hex file verification failure.
  • Added armhf libraries to pynrfjprog

Hashes, 10.15.1

SHA256: 231463B4EFBD69F019F86B8969E16B8FE91C4639603B60E46284304DBEE36E0C

10.15.0 All (Python)

Main changes in this version

  • Update bundled Segger installers and tar balls to v7.56a.
  • Fixed issues in OS X installer and release.
  • Added support for IP-attached J-Link probes.
  • Added hard reset feature.
  • Fixed several device-specific issues, for nRF52 Series devices
  • Fixed issue where ModemUARTDFUProbe did not accept zip files in NRFJPROG_program().
  • FlashNotErasedError or INVALID_OPERATION will no longer be raised when writing to non-empty addresses.

Hashes, 10.15.0

SHA256: A665EAF24767E85B700810DFB44AE6884D96E0335443ABFEF8C9CCAFC41D3860

10.14.0 All (Python)

  • Main changes in this version

    - (pynrfjprog) HighLevel.py: Added function API.find_jlink_path. Allows user to get auto-detected JLinkARM shared library path.
    - (pynrfjprog) LowLevel.py: Added function API.find_jlink_path. Allows user to get auto-detected JLinkARM shared library path.
    - (pynrfjprog) JLink.py: Redirect find_latest_dll() to HighLevel.API.find_jlink_path.
    - (pynrfjprog) Improved modem serial DFU resilience to UART data loss by introducing re-sending of unacknowledged packages.
    - (pynrfjprog) HighLevel.py: Fixed program function with sector-erase option erased too many pages when provided image had data at the end of a page.
    - (pynrfjprog) LowLevel.py: Fixed erase_file function erased too many pages when provided image had data at the end of a page.
    - (pynrfjprog) Fixed issue where mfw packages containing unsegmented update image would not update nrf9160 modem successfully.
    - (pynrfjprog) Image program/read/verify operations will now return an error at an earlier stage if the format is unrecognized. 

     
  • Hashes, v.10.13.0

    nRF-Pynrfjprog                  SHA256: E5C9C3DAED3334825C768663BE3B02EF31B4F3E91087BC60F8FEE2E2B597FDAA


  • 3rd-party licenses, v.10.13.0

    base_n
    bzip2
    cppcodec
    crc
    inih
    jsoncons
    libzip
    mbedtls
    openssl
    spdlog
    zlib


10.13.0 All (Python)

  • Main changes in this version

    - (nrfjprog.exe) Made --coprocessor flag with CP_APPLICATION as the argument available for all devices.
    - (nrfjprog.exe) When an error condition occurs, nrfjprog.exe now prints the last error messages from nrfjprog.dll as part of the error output if logging is enabled.
    - (nrfjprog.exe) Fixed issue where not all memory layouts were correctly discovered.
    - (nrfjprog.exe) --program no longer checks if flash is erased before writing in order to improve performance. The user can append option "--verify" to check memory after write operation.
    - (nrfjprog.exe) --program can now be used perform modem firmware upgrade using debugger on nRF91 devices by passing the modem firmware .zip file as argument.
    - (nrfjprog.exe) Added field "RetainRAM" to QSPI ini file.  

     
  • Hashes, v.10.13.0

    nRF-Pynrfjprog                  SHA256: 43A4DBA756A1F715F79BE8ED50EC2D60C8B4DC4936FE054A8E98CD1DF0F7A966

  • 3rd-party licenses, v.10.13.0

    base_n
    bzip2
    cppcodec
    crc
    inih
    jsoncons
    libzip
    mbedtls
    openssl
    spdlog
    zlib


10.12.2 All (Python)

  • Main changes in this version

    Fixed issue where merging hex files could produce sections with conflicting data, rendering the output hex file invalid.

     
  • Hashes, v.10.12.2

    nRF-Pynrfjprog                  SHA256: 98B347ADC08A7CC1439BF4A538B961BA0142D7E72286F99F4AE9ECE0B329C5A1

  • 3rd-party licenses, v.10.12.2

    base_n
    bzip2
    cppcodec
    crc
    inih
    jsoncons
    libzip
    mbedtls
    openssl
    spdlog
    zlib


10.12.1 All (Python)

  • Main changes in this version

    For a full overview of all changes, please read the release notes located in the installation directory.

  • (highleveldll) Fixed issue where NRFJPROG_get_connected_probes would not find connected probes on some versions of OSX.

  • (highleveldll) Fixed issue on where listing serial ports caused a crash on Ubuntu 20.04.

  • (nrfjprog.dll) Fixed issue on where listing serial ports caused a crash on Ubuntu 20.04.

  • (nrfjprog.exe) Fixed issue on where listing serial ports caused a crash on Ubuntu 20.04.

  • (pynrfjprog)   Fixed issue on where listing serial ports caused a crash on Ubuntu 20.04.


     
  • Hashes, v.10.12.1

    nRF-Command-Line-Tools-Win32    SHA256:
    20F52AB90FD5F25F1147A5AAF401EAD5
    84D4617EC86B790C436203CD7240B429

    nRF-Command-Line-Tools-x64      SHA256:
    0D8E73E3E8F086A84E10867F4BC1EF41
    7DFF72E2EB83842216268FA986167862

    nRF-Pynrfjprog                  SHA256:
    9FC75621818F685C2E4B24F2783376F
    1BD5E39030A57D999DB28FC63F5A7C22B

    nRF-Command-Line-Tools-Linux32  SHA256:
    10E5414FEBB5EE5B4F6CA842C104C279
    9755CAB8D28CF9E5FD71D05890FFEF76

    nRF-Command-Line-Tools-Linux64  SHA256:
    B99558DD631DB7F06FE7CFAB0A876D35
    2851BBC1E97015432486588B9CAF8184

    nRF-Command-Line-Tools-OSX      SHA256:
    16B4F40BEEE75EC8D7A6B45B5C1B831
    A7602DC397791A7439282290D37B2A357

  • 3rd-party licenses, v.10.12.1

    base_n
    bzip2
    cppcodec
    crc
    inih
    jsoncons
    libzip
    mbedtls
    openssl
    spdlog
    zlib


10.12.0 All (Python)

  • Main changes in this version

    For a full overview of all changes, please read the release notes located in the installation directory.

    • Update bundled Segger installers and tar balls to v6.86f.
    • Updated doc string for NRFJPROG_erase_all to make the note about NVM block protection more clear.
    • Add function NRFJPROG_is_eraseprotect_enabled(). In devices that does not support erase protection (nrf51, nrf52), this function returns false.
    • If erase protection is enabled, erase functions will now return NOT_AVAILABLE_BECAUSE_PROTECTION if the target operation is not possible.
    • NRFJPROG_recover() can now disable erase protection if no readback protection is enabled.
    • Fixed issue where in nRF53 devices, NRFJPROG_readback_protect(SECURE) did not enable secure ap protection.
    • Fixed issue where in devices with trustzone, nrfjprog could select NVMC_NS for erase operations, causing the erase operation to fail silently.
    • Fixed issue there if SECURE readbackprotection was enabled, NRFJPROG_read(), NRFJPROG_read_u32(), NRFJPROG_write(), and NRFJPROG_write_u32() would fail with NOT_AVAILABLE_BECAUSE_PROTECTION even though the operation was possible.
  • Hashes, v.10.12.0

    nRF-Command-Line-Tools-Win32    SHA256:
    3A5E9EF58418DC2AD80D076D2685D886
    1DC78587E998664974CC65970967ABEB

    nRF-Command-Line-Tools-x64      SHA256:
    8AB05725DCEB83DB657875C2E23BE3B
    BB7994A741AC291D3E08F4849F2D9135F

    nRF-Pynrfjprog                  SHA256:
    7624C5A3621AA9D88329F5EB09055007
    C8D62FA760A8926FDA8BBCD23437C484

    nRF-Command-Line-Tools-Linux32  SHA256:
    2EE61E8870C715E1A5BDF8ADDA7F30D
    58611046C64C30CA5A8A11493BB04166D

    nRF-Command-Line-Tools-Linux64  SHA256:
    DE00540079F31831B4C99CE53FCB8F9B
    437F2198B8BFF4E2DF6A0529BE8FED08

    nRF-Command-Line-Tools-OSX      SHA256:
    389F82F8A2ADD3367D39ECD61286BA59
    E365FAFA889F01B4DC4D3D196C402E92

  • 3rd-party licenses, v.10.12.0

    base_n
    bzip2
    cppcodec
    crc
    inih
    jsoncons
    libzip
    mbedtls
    openssl
    spdlog
    zlib


10.11.1 All (Python)

  • Changes in this version

    For a full overview of all changes, please read the release notes located in the installation directory.

    • Update bundled Segger installers and tar balls to v6.86f.
    • Updated doc string for NRFJPROG_erase_all to make the note about NVM block protection more clear.
    • Add function NRFJPROG_is_eraseprotect_enabled(). In devices that does not support erase protection (nrf51, nrf52), this function returns false.
    • If erase protection is enabled, erase functions will now return NOT_AVAILABLE_BECAUSE_PROTECTION if the target operation is not possible.
    • NRFJPROG_recover() can now disable erase protection if no readback protection is enabled.
    • Fixed issue where in nRF53 devices, NRFJPROG_readback_protect(SECURE) did not enable secure ap protection.
    • Fixed issue where in devices with trustzone, nrfjprog could select NVMC_NS for erase operations, causing the erase operation to fail silently.
    • Fixed issue there if SECURE readbackprotection was enabled, NRFJPROG_read(), NRFJPROG_read_u32(), NRFJPROG_write(), and NRFJPROG_write_u32() would fail with NOT_AVAILABLE_BECAUSE_PROTECTION even though the operation was possible.
  • Hash, v.10.11.1

    nRF-Pynrfjprog                  SHA256: F5E0D593C557727B3FEBD37BD6F0B887F3E6CAA375CBEA9E9AB6D4C97C6F250B

10.10.0 All (Python)

  • Changes in this version

    • Stopped testing nRF Pynrfjprog with Python 3.4
    • Removed limitation on how many files can be passed to mergehex –merge
    • Update bundled SEGGER installers and tar balls to v6.84a

    For a full overview of all changes, please read the release notes located in the installation directory.

  • Hash, v.10.10.0

    nRF-Pynrfjprog SHA256:
    e9f06f8f3a2fee29c708cd54b79cbc1f
    e83e9327acb64f8315a182999a8d727b

10.9.0 All (Python)

  • Changes in this version

    • Fixed bug where custom instructions with only one argument in QSPI INI file caused a crash
    • nRF9160_XXAA: Introduced split between Engineering A (nRF9160_XXAA_rev1) and Revision 1 (nRF9160_XXAA_rev2)
    • In special circumstances, pin resets could cause debug power to be enabled. Fixed.
    • If jlink_path argument to NRFJPROG_open_dll is NULL or nullptr, the dll will attempt to search for a J-Link dll automatically.
    • NRFJPROG_qspi_custom had inconsistent argument types across dlls. Fixed.
    • Some QSPI commands could loop forever. They now time out after 15 minutes.
    • Fixed MCUBoot serial timing issue that caused the mcuboot process to time out.

    For a full overview of all changes, please read the release notes located in the installation directory.

  • Hash, v.10.9.0

    nRF-Pynrfjprog                  SHA256:
    F0BF5662762690D183515B4D895F4DB3
    7C7CDB2E6F9443C3502C8BA7D97F7A78




10.8.0 All (Python)

  • Changes in this version

    • Added SHA1, SHA256, and md5 hashes for all release files (see below)
    • Updated bundled Segger installers and tar balls to v6.70d
    • Added unicode support for CLI arguments in nrfjprog.exe
    • Added --deviceversion CLI argument for nrfjprog.exe
    • Fixed issue where some versions of nRF9160 would not be recognized by the family detection algorithm used when family is unknown
    • Added aliases for PC, LR, and SP registers in CPU register enumerators
    • Increased readability in logs

    For a full overview of all changes, please read the release notes located in the installation directory.

  • Hashes

    nRF-Command-Line-Tools-Win32, SHA256:
    1806a25131536584b7ddc01d1da4c609
    461a5ee9f3ee8b4a616afbd610125e35

    nRF-Command-Line-Tools-x64, SHA256:
    7d4225e01f9e2a52e51a94614485cdfb
    0697efdc19831ecb3c4786494d965a1f

    nRF-Pynrfjprog, SHA256:
    3585de8320903d7f5b23f4ce18859d9a
    c848d71ba718a54447dc4f61e00c4334

    nRF-Command-Line-Tools-Linux32, SHA256:
    83c032e1bed1b1bc29d30f77c168c222
    5f1c1f4a61cb32cf89450ef8a2dfe6e7

    nRF-Command-Line-Tools-Linux64, SHA256:
    411e52fe662f6c8dbc1325a82e8711e6c
    6f67c6dcd018cb32f0db785278ea7d6

    nRF-Command-Line-Tools-OSX, SHA256:
    0c6af1ce68829d1ccc7b600219b255605a
    0c7ca704dabc92f74a191aa16af0e4


10.7.0 All (Python)

Changelog from 10.6.0 to 10.7.0:
- (Release) Update bundled Segger installers and tar balls to v6.62b.

- (WindowsRelease) Included .lib files for all dlls.

- (OSXRelease) Fixed issue where OSX release contained a tar ball with the same name as the parent tar ball.

- (nrfjprog.exe) Added support for nRF52820_xxAA_REV2

- (nrfjprog.dll) Fix issue where nRF9160 targets could be identified as nRF9160_FUTURE.
- (nrfjprog.dll) Fix issue where nRF52 targets were not halted during page erase.
- (nrfjprog.dll) nRFJProg now updates the debug probe fw without user interaction again (changed in 10.6.0). Note that this may lead to issues with J-Link Dll versions v6.60 to v6.60f.
- (nrfjprog.dll) Added support for nRF52820_xxAA_REV2
- (nrfjprog.dll) NRFJPROG_connect_to_emu_with_snr() will fail with WRONG_FAMILY_FOR_DEVICE if the target device debug port IDR does not match the one expected by the dll.
- (nrfjprog.dll) NRFJPROG_connect_to_emu_without_snr() will fail with WRONG_FAMILY_FOR_DEVICE if the target device debug port IDR does not match the one expected by the dll.

- (pynrfjprog)   Added support for nRF52820_xxAA_REV2

- (highleveldll) Added support for nRF52820_xxAA_REV2

10.6.0 All (Python)

  • Update bundled Segger installers and tar balls to v6.60e.
  • Added support for modem firmware upgrade for nRF91 over serial port communication.
  • Fixed bug where nrfjprog could not be called from inside a folder containing utf characters.
  • Fixed issue where nrfjprog exe caused segmentation faults if an unsupported JLink Dll was loaded.
  • Documented “—log” functionality and argument option to set log file location.
  • Known issue: nRFJProg previously updated the debug probe fw without user interaction. Due to an issue with J-Link, a popup will now appear on connection if a fw update is available.

10.5.0 All (Python)

  • Added support for nRF5340
  • Update bundled Segger installers and tar balls to v6.54c.
  • Added rtt functionality to highleveldll

10.4.1 All (Python)

    • Installation of command line tools on OSX, fixed.
    • In some cases when nrfjprog was called through an indirection (ie. PATH or symlink), it could not find its local resources. Fixed.
    • For Linux and OSX, nrfdfu file had changed name. Fixed.
    • Bundled with Segger JLink version 6.50b

10.4.0 All (Python)

  • In devices with Trustzone, if AIRCR.SYSRESETREQS was set and the core was running NonSecure code, operations that required a call to disable_bprot could fail silently. Fixed.
  • In devices with SPU, if a page was set as NonSecure, erasepage and sectorerase failed silently. Fixed.
  • In special circumstances family detection in unknown dll could fail for nRF9160. Fixed.
  • Added MCUBoot support for Zephyr targets over serial port communication.
  • Updated Segger JLink to version 6.50b.

10.3.0 All (Python)

  • erase_page() now returns UNAVAILABLE_BECAUSE_BPROT if block protection is enabled for the page to erase.
  • Added NrfjprogdllErr enum UNAVAILABLE_BECAUSE_BPROT for when an operation is expected to fail due to block protection mechanisms.

10.2.1 All (Python)

  • (pynrfjprog) New functions added, including modem DFU
  • (nRF-Command-Line-Tools) Fixed issue where if BPROT, ACL, SPU or other similar mechanisms were used to protect memory, program might silently fail.
  • (nRF-Command-Line-Tools) Updated ipc_dfu bootloader
  • (nrfjprog) In some special circumstances page erase would fail to erase, fixed

10.1.1 All (Python)

  • Includes Segger J-Link Software Pack v6.44e
  • Added support for nRF9160
  • Added support for nRF52811
  • Added support for nRF52810 revision 2
  • Added support for nRF52840 revision 2
  • Initial release of OS X .dmg and .pkg packages
  • Initial release of Linux .deb package
  • Added HighLevel.py module, a python API for the nrfjprog.exe-like highlevelnrfjprog library
  • Changed to Nordic 5-clause license
  • Various bug fixes and improvements

9.8.0 All (Python)

  • (pynrfjprog)   Moved loadable library files (.dll-s, .so-s, .dylib-s) from OS-specific folders into common folders lib_x86 and lib_x64 depending on architecture. 
  • (pynrfjprog)   Added timestamp to the logging printouts.
  • (nRF5x-Command-Line-Tools) Update to Segger J-Link Software Pack v6.34g
  • (nRF5x-Command-Line-Tools) Only support Windows 7 and newer versions
  • (nRF5x-Command-Line-Tools) Added option to support flash hex files with address-unaligned records
  • (nRF5x-Command-Line-Tools) Renamed some dll header files, se release notes for details

9.7.3 All (Python)

  • Windows install includes Segger J-Link Software Pack v6.22g
  • Bug fixes and stability improvements

9.7.2 All (Python)

  • Windows install Includes Segger J-Link Software Pack v6.20i
  • Added support for new device nRF52840_xxAA_ENGB

9.7.1 All (Python)

  • Windows install Includes Segger J-Link Software Pack v6.20b
  • Fixed bug in jlinkarm dll detection on Linux and OS X. Some cases were not covered by 9.7.0 update.

9.7.0 All (Python)

  • Initial release of new High Level nRFJProgDLL
  • Added support for nRF52840_xxAA_Rev1 device
  • Added support for long frames in NRFJPROG_qspi_custom() function

9.6.0 All (Python)

  • Initial release of new High Level nRFJProgDLL
  • Added support for nRF52840_xxAA_Rev1 device
  • Added support for long frames in NRFJPROG_qspi_custom() function