Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 3.57 KB

README.md

File metadata and controls

91 lines (57 loc) · 3.57 KB

OpenThread on SAMR21 Example

This repo contains example platform drivers for the Microchip ATSAMR21G18A based on SAM R21 Xplained Pro Evaluation Kit.

The example platform drivers are intended to present the minimal code necessary to support OpenThread. See the "Run the example with SAMR21 boards" section below for an example using basic OpenThread capabilities.

Toolchain

Download and install the GNU toolchain for ARM Cortex-M.

In a Bash terminal, follow these instructions to install the GNU toolchain and other dependencies.

$ cd <path-to-ot-samr21>
$ ./script/bootstrap

Building

  1. Download Advanced Software Framework (ASF).
  1. Unzip it to /third_party/microchip folder
$ unzip asf-standalone-archive-3.45.0.85.zip
$ cp xdk-asf-3.45.0 -rf <path-to-ot-samr21>/third_party/microchip/asf
  1. Build OpenThread Firmware (CLI example) on SAMR21 platform.
$ cd <path-to-ot-samr21>
$ ./script/build

Flash Binaries

After a successful build, the elf files are found in <path-to-ot-samr21>/build/bin/.

Compiled binaries may be flashed onto the SAM R21 Xplained Pro using embedded debugger EDBG.

Open a terminal:

$ openocd -f board/atmel_samr21_xplained_pro.cfg

Leave the terminal open to monitor the status of the opencd server and open a new terminal.
In this terminal:

$ cd <path-to-ot-samr21>/build/bin
$ arm-none-eabi-gdb ot-cli-ftd
$ (gdb) target remote 127.0.0.1:3333
$ (gdb) load
$ (gdb) monitor reset
$ (gdb) c

Interact

  1. Open terminal to /dev/ttyUSB1 (serial port settings: 115200 8-N-1).
  2. Type help for list of commands.
  3. See OpenThread CLI Reference README.md to learn more.

Contributing

We would love for you to contribute to OpenThread and help make it even better than it is today! See our Contributing Guidelines for more information.

Contributors are required to abide by our Code of Conduct and Coding Conventions and Style Guide.

License

OpenThread is released under the BSD 3-Clause license. See the LICENSE file for more information.

Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.

Need help?

OpenThread support is available on GitHub: