Firmware for the CommonSense project.
Go to file
2025-09-30 00:50:14 +02:00
.cargo Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
src Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
.gitignore Basic project setup (#1) 2024-11-01 23:49:53 +00:00
build.rs Basic project setup (#1) 2024-11-01 23:49:53 +00:00
Cargo.lock Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
Cargo.toml Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
Dockerfile Basic project setup (#1) 2024-11-01 23:49:53 +00:00
LICENSE Initial commit 2023-08-24 19:13:43 +00:00
memory.x Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
README.md Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
s112_nrf52_7.3.0_softdevice.hex Make software compatible with commonsense-hw 2025-09-30 00:50:14 +02:00
s132_nrf52_7.3.0_softdevice.hex Basic project setup (#1) 2024-11-01 23:49:53 +00:00

CommonSense

Firmware for the CommonSense project.

Compile and Run

The firmware depends on the S132 softdevice. Before running the firmware, the softdevice has to flashed to the chip.

Flashing the Softdevice

  1. Erase the chip
    $ probe-rs erase --chip nRF52832_xxAA
    
  2. Flash the softdevice
    $ probe-rs download --verify --binary-format hex --chip nRF52832_xxAA s132_nrf52_7.3.0_softdevice.hex
    

Compile and Run

  1. Install the required tools. Consult Dockerfile for specifics
  2. Build the firmware
    $ cargo build --release
    
  3. Flash / run the firmware
    $ cargo fr
    $ # OR
    $ cargo run --release
    

Compile and Run using Docker

  1. Build the docker image
    $ docker build . -t commonsense
    
  2. Build the firmware
    $ docker run --rm -v $PWD:$PWD -w $PWD -u $(id -u):$(id -g) commonsense cargo build --release
    
  3. Flash / run the firmware
    $ docker run --privileged -v /dev/bus/usb/:/dev/bus/usb --rm -v $PWD:$PWD -w $PWD -u $(id -u):$(id -g) commonsense cargo fr
    $ # OR
    $ docker run --privileged -v /dev/bus/usb/:/dev/bus/usb --rm -v $PWD:$PWD -w $PWD -u $(id -u):$(id -g) commonsense cargo run --release
    

Notes