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 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
- 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.
OpenThread support is available on GitHub:
- Bugs and feature requests pertaining to the OpenThread on SAMR21 Example — submit to the openthread/ot-samr21 Issue Tracker
- OpenThread bugs and feature requests — submit to the OpenThread Issue Tracker
- Community Discussion - ask questions, share ideas, and engage with other community members