Skip to content

Environment setup

This document describes how to prepare development environment for fobnail.

Building docker container

For the purpose of fobnail application development we have put necessary software into a single docker container which we called fobnail SDK. In order to build the container follow the steps below:

  1. Install docker using the guide for Linux distribution present on your computer.
  2. Add your user to docker group: sudo usermod -aG docker $USER. Then log out of the desktop session then log in again. This step is one-time only.
  3. Clone the fobnail SDK repository:
    git clone https://github.com/fobnail/fobnail-sdk.git
    
  4. Go to fobnail SDK directory: cd fobnail-sdk
  5. Execute ./build.sh. It will build the container with following software available:
  6. Rust 1.55.0
  7. Cargo-embed: always the latest version available from Cargo registry

You will need fobnail-sdk to proceed with any work. The process will take a while to build the container. If we have built the container, time to verify it. We will build a sample application from the fobnail directory using the freshly built docker container. Follow the steps below to test the container:

  1. git clone https://github.com/fobnail/nrf-hal
  2. cd nrf-hal
  3. Switch to blinky-demo-nrf52840 branch: git checkout blinky-demo-nrf52840
  4. Start container: ./run-container.sh
  5. Build a blinky application:
    cd examples/blinky-demo-nrf52840
    cargo build --target thumbv7em-none-eabihf
    
  6. At the end of the process you should see something like this:
    Compiling blinky-demo-nrf52840 v0.1.0 (/home/build/nrf-hal/examples/blinky-demo-nrf52840)
    Finished dev [unoptimized + debuginfo] target(s) in 1m 14s