circuitpython/ports/nrf/README.md
2019-10-06 21:30:26 -04:00

2.1 KiB

CircuitPython Port To The Nordic Semiconductor nRF52 Series

This is a port of CircuitPython to the Nordic Semiconductor nRF52 series of chips.

Note

: There are board-specific READMEs that may be more up to date than the generic board-neutral documentation below.

Compile and Flash

Prerequisite steps for building the nrf port:

git clone <URL>.git circuitpython
cd circuitpython
git submodule update --init --recursive
make -C mpy-cross

Some boards have UF2 bootloaders and can simply be flashed in the normal way, by copying firmware.uf2 to the BOOT drive.

To build and flash issue the following command inside the ports/nrf/ folder:

make BOARD=pca10056
make BOARD=pca10056 flash

Segger Targets

Install the necessary tools to flash and debug using Segger:

JLink Download

nrfjprog linux-32bit Download

nrfjprog linux-64bit Download

nrfjprog osx Download

nrfjprog win32 Download

note: On Linux it might be required to link SEGGER's libjlinkarm.so inside nrfjprog's folder.

DFU Targets

run follow command to install adafruit-nrfutil from PyPi

$ pip3 install --user adafruit-nrfutil

make flash and make sd will not work with DFU targets. Hence, dfu-gen and dfu-flash must be used instead.

  • dfu-gen: Generates a Firmware zip to be used by the DFU flash application.
  • dfu-flash: Triggers the DFU flash application to upload the firmware from the generated Firmware zip file.

When enabled you have different options to test it: