gamnes gravatar image

Posted 2015-10-27 11:31:41 +0100


nRF5x-Tools and nRF5x-Pynrfjprog Includes Linux and Python 3 Support

Over the last few weeks the Nordic team has been working on getting support for programming our devices in Linux as well as adding support for using our Python programming module ‘Pynrfjprog’ with Python 3.

We are pleased to report that this support has been added and published! We now support both Linux and Python 3!

image description image description

The tools offering now consists of the following components which can be downloaded from our webpages:

  • nRF5x-Tools-Win32 - nRF5x toolset installer for Windows (JLinkARM, JLink CDC, nRFjprog, and mergehex)
  • nRF5x-Tools-Linux - nRF5x toolset tar for Linux (nRFjprog)
  • nRF5x-Pynrfjprog - Python binding for nrfjprog.dll. Only usable in 32 bit Python 2.7, 3.4, and 3.5, in Windows and Linux.

Our Python development tool is in addition to being available for download on our webpages, uploaded to the Python Package Index server - PyPI. It can thus be downloaded and installed using the Python package installer ‘pip’ using the command [ $ pip install pynrfjprog ]


If you download the tool and experience any issue, please let us know so that it can be improved. Any questions can be posted here on ‘DevZone - Questions’ to make sure that they are handled properly.

Known issues/limitations:

  • The software has only been tested in Ubuntu 14.04.3 - 64-bit
  • The SEGGER software for Linux is necessary for the nRF5x-Tools to work
    • The SEGGER software can be found and downloaded from their webpages
    • The SEGGER software is expected to be found at its default location ‘/opt/SEGGER/JLink/’
    • Using their .deb installer will give this setup for Ubuntu
  • The Linux tools are currently implemented in the same way as the Windows tools, meaning all necessary files needs to be located in the same folder for them to function properly
    • Note: The nrfjprog files cannot be located in the same folder as the SEGGER/JLink files
  • The Linux tools currently only works on 64-bit version, a 32-bit will be published later
  • The error messages given are not modified to match the Linux version


j0kkonen gravatar image

Posted Oct. 27, 2015, 2:29 p.m.

I just managed to get nrfjprog working on Linux and have one correction to documentation;

nrfjprog has to be in different directory than JLink files for things to work, not same directory ( folder ).

gamnes gravatar image

Posted Oct. 27, 2015, 3:29 p.m.

Thanks Juha, has been added to known issues/limitations! This will probably be fixed in a future release.

metch gravatar image

Posted Nov. 2, 2015, 9:41 p.m.

Great news, thanks. Looking forward to have official cross-platforms tools ;)

Posted Nov. 6, 2015, 3:49 a.m.

Thanks guys, I got blinky compilation and flashing work on Ubuntu 14.04.3 and nRF52 preDK

bxd gravatar image

Posted Nov. 17, 2015, 7:31 p.m.

Looks like this release broke some Python 2 support when it added 3 support. Specifically, the _is_u32 function only checks that the incoming value is an int, not a long. This is only appropriate for Python 3. In Python 2, 32-bit values with the high bit set become longs. Pynrfjprog 7.6.0 handled this correctly.

Is there a better place to report bugs with the library?

david.garcia.polo gravatar image

Posted Dec. 1, 2015, 10:34 a.m.

Post a question to post bugs into the Questions site, but in this case it is not an error.

If you see line 18 in I am importing int from builtins (coming from the future module). In Python 2 this int now includes int and long. In Python 3 this int only includes int.

You can make a test yourself to check.

Sign in to comment.