Modified: 2022-10
A toolchain for baremetal development of STM32G4 microcontrollers.
This toolchain leverages the following software tools:
- CMake (Build system)
- ARM GCC (Code generation toolchain)
- STM32CubeG4 (STM microcontroller header files)
- OpenOCD (Open source on-chip debugger)
For installation instructions see the developers guide
Clone this repository and navigate to the repository root:
git clone [email protected]:dronectl/stm32g431-toolchain.git
cd stm32g431-toolchain
Initialize the build system using cmake
. Export compile commands to configure Intellisense:
mkdir build
cd build
# pass the basepath of the STM32CUBEG4 install directory
cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DSTM32CUBEG4_BASE=/Applications/stm/g4/STM32CubeG4
...
Compile the firmware
make -j
...
Plugin the evaluation board to your PC over mini USB and flash the microcontroller over UART:
make flash
OpenOCD automatically detects STLINK debugger interfaces over USB.
This repository sources the accompanying reference documentation for doing baremetal programming on the STM32G431xx microcontroller. You can download the pdfs here
This project is licensed under the terms of the MIT License