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.
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
- Download Advanced Software Framework (ASF).
- 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
- Build OpenThread Firmware (CLI example) on SAMR21 platform.
$ cd <path-to-ot-samr21>
$ ./script/build
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 openocd 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
- Open terminal to
/dev/ttyUSB1
(serial port settings: 115200 8-N-1). - Type
help
for list of commands. - See OpenThread CLI Reference README.md to learn more.
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.
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.
There are numerous avenues for OpenThread support:
- Bugs and feature requests — submit to the Issue Tracker
- Stack Overflow — post questions using the
openthread
tag - Google Groups — discussion and announcements at openthread-users
The openthread-users Google Group is the recommended place for users to discuss OpenThread and interact directly with the OpenThread team.