This simple project gives an example of how to use CMake + libopencm3
for stm32 development with C++. A specific example is given for the stm32f765 cpu. The blink
example comes from libopencm3's miniblink. The openocd
tool is used for flashing with a stlink-v2.
- Install an arm-none-eabi toolchain and add to
PATH
(following here) -- tested with gcc-arm-none-eabi-10-2020-q4-major - install
openocd
and setupudev
rules if needed -- tested with 0.10.0
- Tested on VOXL Flight Core using a knock-off stlink-v2 programmer
- had to use
reset_config none
when setting up openocd to program this specific board --- make sure RESET pin is connected. - After getting stlink-v2 programmer connected to voxl flight core (with separate power), run
make blink-stlink-flash
to use openocd to program the board.