2. Build ProjectΒΆ

  1. Go to the folder where you want download the project. Press the right mouse button and from the menu select Git Bash Here.
_images/bash-mbed.jpg
  1. Launch the following command in order to download the project:
mbed import https://os.mbed.com/teams/Avnet-Silica/code/mbed-os-sensor-node/
cd mbed-os-sensor-node/

Note

The command “mbed deploy” will require few minutes.

  1. From the root of the project open mbed_app.json file and modify the following line:
  • change “spirit1.mac-address”: “{0x7, 0x6, 0x5, 0x4, 0x3, MONTH, DAY, YEAR}” substituting MONTH, DAY, YEAR with hex numbers. For example your birth date.
  1. Go to mbed device connector webpage and login into it.
  2. Go to the page Security Credentials and click on Get my device security credentials:
_images/mbed-security.jpg
  1. Copy the text showed on grey background.
  2. In the root directory of the project open security.h file and paste substituting all text.
  3. Then compile the project for the sensor node:
mbed compile -t GCC_ARM -m SILICA_SENSOR_NODE -c

where:

  • -t selects the toolchain used.
  • -m selects the device compiled for.
  • -c rebuilds all from scratch.
  1. At the end of the compilation you will have a screen like this:
_images/compiled.jpg
  1. The firmware has been created at BUILD\SILICA_SENSOR_NODE\GCC_ARM\mbed-os-sensor-node.bin
  2. Copy the binary file into the mass-storage of the board. Once it is copied the demo will start.