A Hobby-grade HAL/BSP for the STM32-H750-disco board.
- Tune memory timings
- Doom
- Ethernet + network stack
- UDP pixelflut
- Build a pixelflut wall @ DCTF27 or something.
- System clock setup (480MHz + QSPI + LTDC)
- Setup for external SDRAM (8 MiB @
0x9000_0000) - Header only include fault handlers (
crash.h)
usart(blocking only for now)nvicclock(subset of RCC; work in progress)mpugpiodebug(SWO logging)qspiltdc
badfs(a simple read-only filesystem for QSPI flash)text(a simple text rendering library for LTDC)sprintf(stb_sprintf)
SysTickandsys_delay- FPU setup
- I-Cache, D-Cache and branch predictor setup
- C23 only codebase with a couple intrinsics
On Arch Linux (btw) you can grab all deps by doing
sudo pacman -Syu --needed \
cmake \
arm-none-eabi-gcc \
arm-none-eabi-gdb \
arm-none-eabi-newlib \
arm-none-eabi-binutils \
stlinkIf targeting clang also grab clang, lld, and baremetal-compiler-rt(AUR).
Otherwise hunt down these deps for your system of choice. Make sure your compiler is new enough for C23
Then you can setup the project by doing
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release
# you can also set:
# -DGCC_PREFIX="/path/to/your/gcc/arm-none-eabi"
# -- or --
# -DUSE_CLANG=ON
# -DCLANG_PATH="/path/to/folder/containing/clang/"
# -DCLANG_RTLIB_PATH="/dir/libclang_rt.builtins-armv7em.a"And then build and flash with
cd build
ninja burn # has build as a dependencyThe project is setup for VSCode debugging with Cortex-Debug. Pressing F5 should start a debug session.
Make sure you rebuild and flash before debugging.
You should check the following docs in order from most to least specific:
- UM2488 - Discovery kit manual (pinout, names other components on board)
- Discovery board schematics (very specific part numbers)
- STM32H750xB datasheet (contains GPIO AF table)
- RM0433 - STM32H7 series manual (documents most peripherals, memory map)
- ARM Cortex-M7 manual (MPU, FPU, NVIC...)
- ARMv7-M Architecture Reference Manual (ISA, SCB, ...)
There are also the specific manuals for the DK components:
Shoutout:
- iKramp/stm32-project (Good place to "borrow" some code)