stm32-boilerplate icon indicating copy to clipboard operation
stm32-boilerplate copied to clipboard

A cross-platform set of examples for the stm32 line of mcus

stm32-boilerplate

A minimal project to get going with stm32 microcontrollers.

This project depends on arm-none-eabi-gcc, cmake, and python. Continuous integration depends also on clang-format for style checks.

To install the toolchain and test your installation run:

./tools/travis-ci-script.sh

To build an example from the example directory choose a target board and do something like this:

mkdir build
cd build
cmake --configure -DTARGET_BOARD=nucleo-f303 -DEXAMPLE=pwm-output-dma ..
make

The program can be uploaded to the board with an stlink programmer by making the flash target:

make flash

visual studio code can be used to upload and debug the code with openocd and the cortex-debug plugin