cvra / robot-software

CVRA monorepo - All software running on our bots lives here
MIT License
43 stars 21 forks source link
c can-bus chibios embedded eurobot robot robotics robotics-competition stm32 uavcan

Robot software stack

Unit tests

STM32 builds

Raspberry Pi build

This repo contains all the software used on our robots:

Other important software components can be found in this repo:

The user guide is generated using mdbook from doc/user-guide

Building with CMake

To build one platform with cmake, for example here our UWB beacon board:

mkdir build-uwb && cd build-uwb
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/uwb-beacon.cmake

# WARNING: Make all or make without target does not work.
make uwb-beacon-firmware.elf

# The resulting firmware is at `uwb-beacon-firmware/uwb-beacon-firmware.elf`.

To build the unit tests for all the boards:

mkdir build
cd build
cmake ..
make all test

Coding style

We use clang-format (tested with version 7 or greater) to enforce proper source code formatting. You can use the format-all.sh script in the root directory to format the whole source tree. You can also use clang-format -i --style=file src/foo.c to format a particular file. Finally, some editors include support for clang-format through plugin, check for yourself.