tree: 832de475002cc5c90f19aff947bf5114b0bab4d8 [path history] [tgz]
  1. alarm.c
  2. emsk.ld
  3. flash.c
  4. logging.c
  7. misc.c
  8. openthread-core-emsk-config.h
  9. platform-emsk.h
  10. platform.c
  11. radio.c
  12. random.c
  14. uart.c

OpenThread on EMSK Example

This directory contains example platform drivers for Synopsys DesignWare® ARC® EM Starter Kit 2.3(EMSK2.3) and Digilent Pmod RF2 equipped with the Microchip MRF24J40 IEEE 802.15.4™ 2.4GHz RF transceiver.


The EMSK platform is a configurable, FPGA-based software development platform for the ARC EM Processor Family. Please note that:

  • The platform does not currently feature a True Random Number Generator (TRNG), which is required for certification to the Thread Specification. Users looking to certify the OpenThread implementation for their own ARC-based platforms will need to add a TRNG to their platform and modify our reference implementation based on EMSK accordingly in order to achieve certification for their platform.
  • The platform does not currently contain a on-chip EUI64, which is required for a network device. Users will need to add a unique number as EUI64 for their own ARC-based platform in <path-to-openthread>/examples/platforms/emsk/radio.c. It can be set manually or loaded from non-volatile memory.


Download and install GNU toolchain for ARC EM.

Download and install Digilent Adept Software for the Digilent JTAG-USB cable.

Building the examples

$ cd <path-to-openthread>
$ ./script/bootstrap
$ ./bootstrap
$ make -f examples/Makefile-emsk clean
$ make -f examples/Makefile-emsk

After a successful build, the elf files can be found in <path-to-openthread>/output/arc-elf32/bin. You can convert them to bin files using arc-elf32-objcopy:

$ arc-elf32-objcopy -O binary ot-cli-ftd ot-cli-ftd.bin

Booting the binaries from SD card

embARC embarc is an open software platform to facilitate the development of embedded systems based on ARCv2 processors. Download embARC embarc to generate and flash the EMSK bootloader from source code. See the application note Using a secondary bootloader on the EMSK for details.

Modify the file name arc-elf32-ot-cli-ftd.bin to boot.bin. Copy boot.bin to the SD card. The EMSK2.3 includes an SPI flash storage device pre-programmed with FPGA images containing different configurations of DesignWare® ARC EM cores. Set pins 1 and 4 of SW1 DIP switch and press FPGA configure button to configure the ARC EM11D and secondary bootloader.

Running the example

  1. Prepare two EMSK2.3 boards and copy the boot.bin (CLI example) to the EMSK2.3 SD card (as shown above).

  2. The CLI example uses UART connection. To view raw UART output, start a terminal emulator like Tera Term and PuTTY. Connect EMSK J7 to the COM port with the following serial port settings:

    • Baud rate: 115200
    • 8 data bits
    • 1 stop bit
    • No parity
    • No flow control
  3. Open a terminal connection on the first board. The boot.bin in the SD card will be loaded to the EMSK after a few seconds.

MRF24J40 Init started.
MRF24J40 Init finished.
Node No. :
  1. Set the node number manually. Input 1 and press the Enter key in the terminal emulator.
Node No. :1
OpenThread Init Finished
  1. Start a new Thread network.
> panid 0x1234
> ifconfig up
> thread start
  1. After a couple of seconds the node will become a Leader of the network.
> state
  1. Open a terminal connection and reset the second board. After a few seconds, input 2 and press the Enter key in the terminal emulator.
MRF24J40 Init started.
MRF24J40 Init finished.
Node No. :2
OpenThread Init Finished
  1. Attach the second node to the network.
> panid 0x1234
> ifconfig up
> thread start
  1. After a couple of seconds the second node will attach and become a Child.
> state
  1. List all IPv6 addresses of the first board.
> ipaddr
  1. Choose one of them and send an ICMPv6 ping from the second board.
> ping fdde:ad00:beef:0:0:ff:fe00:ec00
8 bytes from fdde:ad00:beef:0:0:ff:fe00:ec00: icmp_seq=1 hlim=64 time=30ms

For a list of all available commands, visit OpenThread CLI Reference


The following hardware have been used for testin and verification:

  • ARC EM11D on EMSK2.3
  • Pmod RF2

The following toolchains and software have been used for testing and verification:

  • arc-2016.09-release
  • embARC 2016.05

The EMSK example has been verified by Synopsys with commit 064aba2.