Skip to content

Repository files navigation

STM32F4 Hello World

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

Hardware

Item Value
MCU STM32F401CCUx (UFQFPN48)
System clock 84 MHz (HSI + PLL)
Debug/serial output USART2 (PA2 TX, PA3 RX)

UART pin mapping

Peripheral TX RX Baud
USART1 PA9 PA10 115200
USART2 PA2 PA3 115200
USART6 PA11 PA12 115200

Prerequisites

  • STM32CubeIDE or arm-none-eabi-gcc + make
  • ST-Link programmer/debugger
  • Optional: serial terminal (e.g. screen, minicom) to view USART2 output

Build

make

The compiled binary will be placed in build/.

Flash

make flash

Or use STM32CubeIDE / STM32CubeProgrammer to flash the .elf/.bin from build/.

Project structure

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

Regenerating with CubeMX

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.

About

First repo for testing sending to and running on ec2 instance

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages