Get and compile firmware for M3 and A8-M3 nodes

 

Difficulty: Medium

 Duration: 20 minutes

Prerequisites: Configure SSH Access

Description: OpenWSN project provide an open-source implementations of a complete protocol stack based on Internet of Things standards. The aim of this tutorial is to understand how to setup your environment and compile and use OpenWSN with M3 or A8-M3 nodes. For these nodes, OpenWSN 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>~$ mkdir openwsn
    <login>@<site>~$ cd openwsn
    <login>@<site>~$ git clone https://github.com/openwsn-berkeley/openwsn-fw.git
    
  2. View and analyse one firmware source code. All firmwares source code are located in the directory common.
    <login>@<site>:~/openwsn$ cd openwsn-fw
    <login>@<site>:~/openwsn/openwsn-fw$ cat projects/common/01bsp_uart/01bsp_uart.c
    <login>@<site>:~/openwsn/openwsn-fw$ ls projects/common/
    01bsp_bothtimers   01bsp_cryptoengine  01bsp_leds      01bsp_radiotimer  01bsp_uart        02drv_sensors   03oos_openwsn
    01bsp_bsp_timer    01bsp_debugpins     01bsp_radio     01bsp_radio_tx    02drv_openserial  03oos_macpong   03oos_sniffer
    01bsp_closetimers  01bsp_eui64         01bsp_radio_rx  01bsp_spi         02drv_opentimers  03oos_mercator
    
  3. Compile bsp_uart firmware for M3 nodes. (you must exclude the leading digits of the firmware directory). The generated elf binary file is  01bsp_uart_prog.
    <login>@<site>:~/openwsn/openwsn-fw$ scons board=iot-lab_M3 toolchain=armgcc bsp_uart
    <login>@<site>:~/openwsn/openwsn-fw$ ls build/iot-lab_M3_armgcc/projects/common/
    01bsp_uart 01bsp_uart_prog.bin 01bsp_uart_prog 01bsp_uart_prog.ihex
  4. Compile bsp_uart firmware for A8-M3 nodes.
    <login>@<site>:~/openwsn/openwsn-fw$ scons board=iot-lab_A8-M3 toolchain=armgcc bsp_uart
    <login>@<site>:~/openwsn/openwsn-fw$ ls -la build/iot-lab_A8-M3_armgcc/projects/common/
    01bsp_uart 01bsp_uart_prog.bin 01bsp_uart_prog 01bsp_uart_prog.ihex