Get and compile firmware for M3 and A8-M3 nodes

 

Difficulty: Medium

 Duration: 20 minutes

Prerequisites: Configure SSH Access

Description: RIOT is an operating system designed for the particular requirements of Internet of Things (IoT) scenarios. The aim of this tutorial is to understand how to setup your environment and how to compile and use RIOT with M3 nodes. For these nodes, RIOT needs the toolchain arm-none-eabi-gcc. The frontend SSH servers site provide this toolchain, hence we can use it.

  1. Setup your environment
    ssh <login>@<site>.iot-lab.info
    <login>@<site>~$ git clone https://github.com/iot-lab/iot-lab.git
    Cloning into 'iot-lab'...
    ...
    <login>@<site>~$ cd iot-lab
    <login>@<site>:~/iot-lab$ make
    
      Welcome to the IoT-LAB development environment setup.
    
      targets:
    	setup-wsn430 
    	setup-openlab
    	setup-contiki
    	setup-riot
    	setup-cli-tools
    	setup-aggregation-tools
    
    	pull
  2. Setup RIOT target
    <login>@<site>:~/iot-lab$ make setup-riot
    make setup-riot
    git clone -b 2017.10-branch https://github.com/RIOT-OS/RIOT.git parts/RIOT
    Cloning into 'parts/RIOT'...
    ...
    <login>@<site>:~/iot-lab$ cd parts/RIOT
  3. We run a first example provided in parts/RIOT/examples/default. View and analyse the source code of this example.
    <login>@<site>:~/iot-lab/parts/RIOT$ cd examples/default
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ cat README.md
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ cat main.c
  4. Compile the example for M3 board target. The generated binary files are in parts/RIOT/examples/default/bin/iotlab-m3/
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ BOARD=iotlab-m3 make all
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ ls bin/iotlab-m3/
    ...  default.elf default.hex ...
  5. Compile the example for A8-M3 board target. The generated binary files are in parts/RIOT/examples/default/bin/iotlab-a8-m3/
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ BOARD=iotlab-a8-m3 make all
    <login>@<site>:~/iot-lab/parts/RIOT/examples/default$ ls bin/iotlab-a8-m3/
    ...  default.elf default.hex ...