STM32CubeMX
More info
- Owner
- STMicroelectronics
- Released
- 2014
- Type
- Configuration and code generation tool
- License
- Proprietary (free)
- Website
- st.com
ST's graphical tool for clicking together the pins, clocks and peripherals of an STM32 and getting the initialisation code generated for you.
An STM32 has hundreds of configuration registers, and working out the clock tree by hand is a reliable way to lose an afternoon. CubeMX draws the chip's pins as a picture, warns when two functions want the same pin, derives PLL settings from the frequency you ask for, and emits C code against ST's HAL or LL drivers. FreeRTOS, FatFs and USB stacks can be ticked in as middleware.
Regenerating overwrites the generated code, except whatever sits between the USER CODE BEGIN and USER CODE END comments. Anyone unaware of this learns it exactly once. Since 2019 the tool has also been built into ST's Eclipse-based STM32CubeIDE.