Pre-Built NCP Firmware

Select pre-built NCP firmware images and flashing instructions are provided here to jump-start your OpenThread development. All binaries are the example platform builds featured in the GitHub repository.

Nordic Semiconductor nRF52840

Nordic Semiconductor nRF52840

Use an i386- or x86-based Linux machine to flash the downloaded nRF52840 firmware image to the nRF52840 board. A Micro-USB to USB is required to attach the board to the Linux machine for flashing and the host development board for operation.

Resources:

Download nRF52840 firmware image

The pre-built nRF52840 firmware image is a .hex file. Download and extract it in your ~/Downloads folder.

DOWNLOAD NRF52840 FIRMWARE IMAGE

This nRF52840 firmware image is built with the following build switches:

BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 UDP_FORWARD=1 USB=1

The USB=1 switch enables native USB CDC ACM as a serial transport.

Use SEGGER J-Link to program the nRF52840 board, which has an onboard JTAG module. Download and install SEGGER J-Link on your Linux machine by extracting the package into /opt/SEGGER/JLink.

DOWNLOAD J-LINK SOFTWARE AND DOCUMENTATION PACK

Install nRF5x Command Line Tools

The nRF5x Command Line Tools flash the OpenThread binary to the nRF52840 board. Install the appropriate nRF5x-Command-Line-Tools-<OS> build on your Linux machine. Place the extracted package in the root folder of ~/.

DOWNLOAD NRF5X COMMAND LINE TOOLS

Flash the nRF52840

  1. Attach the USB cable to the Micro-USB debug port next to the external power pin on the nRF52840 board, and then attach the USB end to the Linux machine. Set the nRF power source switch on the nRF52840 board to VDD. When connected correctly, LED5 is on.
    nRF52840 debug port
  2. Verify that the board is attached by checking for serial ports starting with /dev/ttyACM* (all nRF52840 boards use ttyACM as their serial port identifier). The board appears as /dev/ttyACM0 if it's the only nRF52840 board attached to the Linux machine:
    ls /dev/ttyACM*
    /dev/ttyACM0
  3. Note the serial number of the nRF52840 board:
    nRF52840 serial number
  4. Navigate to the location of the nRFx Command Line Tools, and flash the downloaded ot-ncp-ftd-g0c07c53c-nrf52840.hex file onto the nRF52840 board, using the board's serial number:
    cd ~/nRF5x-Command-Line-Tools_<OS>/nrfjprog
    ./nrfjprog -f nrf52 -s 683704924 --chiperase --program \
           ~/Downloads/ot-ncp-ftd-g0c07c53c-nrf52840.hex --reset
  5. LED5 on the nRF52840 board briefly turns off during flashing. The following output is generated upon success:
    Parsing hex file.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programing device.
    Applying system reset.
    Run.
    

Connect the nRF52840

Because the OpenThread NCP firmware image provided here enables use of native USB CDC ACM as a serial transport, you must use the nRF USB port on the nRF52840 board to communicate with the NCP host board.

  1. Eject the device from the Linux machine and detach the USB cable from both the Linux machine and the debug port of the nRF52840 board.
  2. Attach the USB cable to the Micro-USB nRF USB port next to the RESET button on the nRF52840 board. Set the nRF power source switch on the nRF52840 board to USB.
    nRF52840 usb port
  3. Attach the USB end of the USB cable to your NCP host board (for example, a Raspberry Pi 3B).

Zolertia Firefly

Zolertia Firefly

The Zolertia Firefly features the Texas Instruments CC2538 SoC. Use a Linux machine to flash the downloaded CC2538 firmware image to the Firefly USB stick.

Resources:

Download CC2538 firmware image

The pre-built CC2538 firmware image is a .bin file. Download and extract it in your ~/Downloads folder.

DOWNLOAD CC2538 FIRMWARE IMAGE

This CC2538 firmware image is built with the following build switches:

BORDER_AGENT=1 BORDER_ROUTER=1 COMMISSIONER=1 UDP_FORWARD=1

Install dependencies

A Python serial bootloader script is used to flash the Firefly.

  1. Install required packages:
    sudo apt-get update
    sudo apt-get install python-pip
    pip install python-magic
  2. Clone the Python CC2538 serial bootloader into your root directory:
    cd ~
    git clone --recursive https://github.com/JelmerT/cc2538-bsl

Flash the Firefly

  1. Insert the Zolertia Firefly USB stick into a USB port on your Linux machine.
  2. Verify that the Firefly is attached by checking for serial ports starting with /dev/ttyUSB* (all Firefly USB sticks use ttyUSB as their serial port identifier). The board appears as /dev/ttyUSB0 if it's the only serial device attached to the Linux machine:
    ls /dev/ttyUSB*
    /dev/ttyUSB0
  3. Flash the downloaded ot-ncp-ftd-g0c07c53c-cc2538.bin file onto the Firefly USB stick:
    python ~/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyUSB0 \
           -a 0x00200000 ~/Downloads/ot-ncp-ftd-g0c07c53c-cc2538.bin

Connect the Firefly

  1. Eject the device from the Linux machine and remove the Firefly USB stick.
  2. Insert the Firefly USB stick into a USB port on your target NCP host device (for example, a Raspberry Pi 3B).