Skip to content

ladyada/nRF52_nrfutil

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nrfutil

nrfutil is a Python package that includes the nrfutil command line utility and the nordicsemi library.

This tool can be used used with the Adafruit nRF52 Feather to flash firmware images onto the device using the simple serial port.

This library is written for Python 3.5+ It is no longer Python 2 compatible!

Installation

Run the following commands to make nrfutil available from the command line or to development platforms like the Arduino IDE or CircuitPython:

Notes : Do NOT install nrfutil from the pip package (ex. sudo pip install nrfutil). The latest nrfutil does not support DFU via Serial, and you should install version 0.5.2 from a local copy of this repo via the methods detailed below:

OS X and Linux

$ sudo pip install -r requirements.txt
$ sudo python setup.py install

Note: When installing requirements if you encounter issue Cannot uninstall 'six'. It is a distutils installed project ... . You may need to add --ignore-installed six when running pip.

Windows

Option 1: Pre-Built Binary

A pre-built 32-bit version of nrfutil is included as part of this repo in the binaries/win32 folder. You can use this pre-built binary by adding it to your systems $PATH variable.

Option 2: Build nrfutil from Source

pip install -r requirements.txt
python setup.py install

To generate a self-contained Windows exe version of the utility (Windows only):

python setup.py py2exe

Usage

To get info on usage of nrfutil:

nrfutil --help

To convert an nRF52 .hex file into a DFU pkg file that the serial bootloader can make use of:

nrfutil dfu genpkg --dev-type 0x0052 --application firmware.hex dfu-package.zip

To flash a DFU pkg file over serial:

nrfutil dfu serial --package dfu-package.zip -p /dev/tty.SLAB_USBtoUART -b 115200

About

Modified version of Nordic's nrfutil 0.5.2 for use with the Adafruit Feather nRF52

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 67.6%
  • Gherkin 32.4%