Skip to content

About

Setting up FreeRTOS on STM32 from scratch without CubeMX

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

stm32 freertos from scratch

this repo is a manual bring-up for stm32f303k8 on a nucleo-32 board, without cubemx.

the project starts with bare-metal gpio blink, then adds freertos once the kernel is dropped into third_party/freertos-kernel.

what is here

  • startup/startup_stm32f303x8.s for reset and the vector table
  • linker/STM32F303K8_FLASH.ld for the memory map
  • include/stm32f303k8.h for the small register set used here
  • src/system_stm32f3xx.c for the minimal system init hook
  • src/board.c and src/main.c for the first gpio bring-up
  • src/freertos_app.c for the queue example once freertos is enabled
  • FreeRTOSConfig.h for the rtos config
  • docs/ for the step-by-step notes

how to use it

  1. install arm-none-eabi-gcc, make, and openocd
  2. build the bare-metal blink first with make
  3. flash the elf or bin with the openocd target from the makefile
  4. clone the freertos kernel into third_party/FreeRTOS-Kernel
  5. set FREERTOS_ENABLED=1 and rebuild

short rule of thumb

  • bare-metal first
  • clock next
  • systick and priorities after that
  • freertos only when the low-level pieces are already clear

board note

on the nucleo-f303k8, led3 is on pb3.

the chip starts on the internal 8 mhz hsi clock in this scaffold, which keeps the first bring-up simple and lets you verify the startup path before adding a pll.

About

Setting up FreeRTOS on STM32 from scratch without CubeMX

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages