This repo in a template for STM32 projects using modern cmake. It's designed to be used with convert.sh script inside tools/ that converts existing project(Makefile version) generated by CubeMX program.
-
CMake - version 3.15 and above
-
GCC Compiler
-
arm-none-eabi-gcc compiler https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads https://askubuntu.com/questions/1031103/how-can-i-install-gdb-arm-none-eabi-on-ubuntu-18-04-bionic-beaver
-
stlink-tools sudo apt install stlink-tools
-
minicom for uart communication sudo apt-get install minicom
- Change project name in CmakeLists.txt
- Run tools/convert.cmake to add files from existing CubeMX project
- Run tools/config.cmake to cofigure project
- Build and upload to board
how to:
-
upload to board st-flash write build/.bin <starting memory, usually 0x8000000>
-
probe board st-info --probe
-
read binary from board st-flash read dummy.bin 0 0xFFFF
-
listen to uart sudo minicom -b -o -D /dev/<device, for example ttyACM0>