A minimal "Hello, World!" firmware for the STM32F401CCUx microcontroller, generated with STM32CubeMX and built with the GCC/Makefile toolchain.
Every second the board transmits Hello, World!\r\n over USART2 at 115200 baud.
-Olivia Laufer
| Item | Value |
|---|---|
| MCU | STM32F401CCUx (UFQFPN48) |
| System clock | 84 MHz (HSI + PLL) |
| Debug/serial output | USART2 (PA2 TX, PA3 RX) |
| Peripheral | TX | RX | Baud |
|---|---|---|---|
| USART1 | PA9 | PA10 | 115200 |
| USART2 | PA2 | PA3 | 115200 |
| USART6 | PA11 | PA12 | 115200 |
- STM32CubeIDE or
arm-none-eabi-gcc+make - ST-Link programmer/debugger
- Optional: serial terminal (e.g.
screen,minicom) to view USART2 output
makeThe compiled binary will be placed in build/.
make flashOr use STM32CubeIDE / STM32CubeProgrammer to flash the .elf/.bin from build/.
Core/
Inc/ # Application headers
Src/ # Application source (main.c, system init, HAL MSP)
Drivers/
CMSIS/ # ARM CMSIS headers
STM32F4xx_HAL_Driver/ # STM32 HAL
stm-hello-world.ioc # STM32CubeMX project file
Makefile
Open stm-hello-world.ioc in STM32CubeMX 6.17+ and click Generate Code. User code blocks (USER CODE BEGIN / USER CODE END) are preserved across regeneration.