Embedded system code for Rivanna 2
The recommended approach for development is to use the rivanna2-env container. It contains all of the necessary tools to build the firmware for each board.
docker
, podman
)docker run -it -v $(pwd)/:/root/Rivanna2:Z ghcr.io/solarcaratuva/rivanna2-env
podman run -it -v .:/root/Rivanna2:Z ghcr.io/solarcaratuva/rivanna2-env
Ctrl+Shift+P
and run the Remote-Containers: Open Folder in Container
command. This will open the current folder (Rivanna2) inside of the container../compile.sh
- This script will run mbed-tools compile
with the correct environment and toolchain arguments. This will compile the firmware for all boards. Before running this the first time, run mbed-tools deploy
, which will download the version of Mbed OS specified in mbed-os.lib
.
./upload_{ecu, motor, power_aux, solar}.sh
- This script will check that the correct board is connected and upload the corresponding firmware to the board. (Since the container does not have access to the ST-LINK USB device, this command will have to be run outside of the container.)
./monitor.sh
- This script will run pio device monitor
with the correct baud rate. (Since the container does not have access to the ST-LINK USB device, this command will have to be run outside of the container.)