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:
- Install docker using the guide for Linux distribution present on your computer.
- 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.
- Clone the fobnail SDK repository:
git clone https://github.com/fobnail/fobnail-sdk.git
- Go to fobnail SDK directory:
./build.sh. It will build the container with following software available:
- Rust 1.55.0
- 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:
git clone https://github.com/fobnail/nrf-hal
- Switch to
git checkout blinky-demo-nrf52840
- Start container:
- Build a blinky application:
cd examples/blinky-demo-nrf52840 cargo build --target thumbv7em-none-eabihf
- 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