https://github.com/openthread/ot-samr21
OpenThread on Microchip SAM R21 example.
https://github.com/openthread/ot-samr21
openthread
Last synced: about 1 year ago
JSON representation
OpenThread on Microchip SAM R21 example.
- Host: GitHub
- URL: https://github.com/openthread/ot-samr21
- Owner: openthread
- License: bsd-3-clause
- Created: 2021-01-25T18:34:33.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T15:33:00.000Z (about 1 year ago)
- Last Synced: 2025-04-10T16:48:33.854Z (about 1 year ago)
- Topics: openthread
- Language: C
- Homepage: https://openthread.io/
- Size: 767 KB
- Stars: 9
- Watchers: 19
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenThread on SAMR21 Example
This repo contains example platform drivers for the [Microchip ATSAMR21G18A][samr21] based on [SAM R21 Xplained Pro Evaluation Kit][samr21_xplained_pro].
[samr21]: http://www.microchip.com/wwwproducts/en/ATSAMR21G18A
[samr21_xplained_pro]: https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMR21-XPRO
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][gnu-toolchain].
[gnu-toolchain]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
In a Bash terminal, follow these instructions to install the GNU toolchain and other dependencies.
```bash
$ cd
$ ./script/bootstrap
```
## Building
1. Download [Advanced Software Framework (ASF)][asf].
[asf]: https://www.microchip.com/mplab/avr-support/advanced-software-framework
2. Unzip it to /third_party/microchip folder
```bash
$ unzip asf-standalone-archive-3.45.0.85.zip
$ cp xdk-asf-3.45.0 -rf /third_party/microchip/asf
```
3. Build OpenThread Firmware (CLI example) on SAMR21 platform.
```bash
$ cd
$ ./script/build
```
## Flash Binaries
After a successful build, the `elf` files are found in `/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 /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][cli] to learn more.
[cli]: https://github.com/openthread/openthread/blob/main/src/cli/README.md
# Contributing
We would love for you to contribute to OpenThread and help make it even better than it is today! See our [Contributing Guidelines](https://github.com/openthread/openthread/blob/main/CONTRIBUTING.md) for more information.
Contributors are required to abide by our [Code of Conduct](https://github.com/openthread/openthread/blob/main/CODE_OF_CONDUCT.md) and [Coding Conventions and Style Guide](https://github.com/openthread/openthread/blob/main/STYLE_GUIDE.md).
# License
OpenThread is released under the [BSD 3-Clause license](https://github.com/openthread/ot-samr21/blob/main/LICENSE). See the [`LICENSE`](https://github.com/openthread/ot-samr21/blob/main/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:
- Bugs and feature requests pertaining to the OpenThread on SAMR21 Example — [submit to the openthread/ot-samr21 Issue Tracker](https://github.com/openthread/ot-samr21/issues)
- OpenThread bugs and feature requests — [submit to the OpenThread Issue Tracker](https://github.com/openthread/openthread/issues)
- Community Discussion - [ask questions, share ideas, and engage with other community members](https://github.com/openthread/openthread/discussions)