Difference between revisions of "Riot-OS Setup"
Line 17: | Line 17: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install git | sudo apt-get install git | ||
openocd | openocd | ||
gcc-multilib | gcc-multilib | ||
build-essential | build-essential | ||
python3-serial | |||
libudev-dev | libudev-dev | ||
moserial | moserial | ||
Line 28: | Line 27: | ||
Install the toolchain | Install the toolchain | ||
sudo apt-get install gcc-arm-none-eabi | |||
If you use a recent version of RIOT-OS (Release-2021.07) you can go on with '''Step 3'''. | |||
If you use an older RIOT-OS version, you will have to do the following steps: | |||
Goto https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm and download | Goto https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm and download | ||
Line 54: | Line 60: | ||
git clone https://github.com/RIOT-OS/RIOT.git myRIOT | git clone https://github.com/RIOT-OS/RIOT.git myRIOT | ||
Move to the "Hello World"-Example | |||
cd myRIOT/examples/hello-world | |||
Build the application on "native" | |||
make all term | |||
Now, you should see this output in your terminal: | |||
Release-2021.07 | |||
=== Step 4 === | === Step 4 === |
Revision as of 14:34, 13 October 2021
Summary
Setting up Riot-OS on a Atmel SAM R21 Xpro Board.
Requirements
- Operating system: Ubuntu 20.04
- Packages: git
Description
Step 1
Install the following packages
sudo apt-get update sudo apt-get install git openocd gcc-multilib build-essential python3-serial libudev-dev moserial
Step 2
Install the toolchain
sudo apt-get install gcc-arm-none-eabi
If you use a recent version of RIOT-OS (Release-2021.07) you can go on with Step 3.
If you use an older RIOT-OS version, you will have to do the following steps:
Goto https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm and download
gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
Move it to your home directory.
Uninstall old packages
sudo apt remove binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi
Unzip the downloaded file
tar -xjvf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
Add the toolchain to your path
export PATH=$PATH:/home/(your user)/gcc-arm-none-eabi-7-2018-q2-update/bin/
For now: you will have to do this in the bash where you build your application - after each restart.
Step 3
Download Riot-OS
git clone https://github.com/RIOT-OS/RIOT.git myRIOT
Move to the "Hello World"-Example
cd myRIOT/examples/hello-world
Build the application on "native"
make all term
Now, you should see this output in your terminal:
Release-2021.07
Step 4
Build and run "Hello World" on the SAM R21 Board.
Set the rights for your username to be able to flash the application on the board.
sudo usermod -a -G dialout <username>
Then reboot your computer.
Attach the antenna to the board - never use it without the antenna! Connect the board to your computer via micro USB cable (USB EDBG interface).
Connect via Moserial.
Build and flash the application.
cd myRIOT/examples/hello-world make BOARD=samr21-xpro make BOARD=samr21-xpro flash
If you do not use a serial terminal like moserial or terraterm use term
make BOARD=samr21-xpro term
You may also set the BOARD in the Makefile of the application.
Used Hardware
Atmel SAM R21 Xplained Pro Evaluation Platform
Courses
- Mobile and Embedded Security (2019)