
Copy .data and Zero .bss Correctly in Your Reset Handler
Copy .data from flash and zero .bss in a Cortex-M reset handler without bugs: alignment, the memset trap, empty sections and a debugger check to run.
Everything you need to level up your coding skills.

Copy .data from flash and zero .bss in a Cortex-M reset handler without bugs: alignment, the memset trap, empty sections and a debugger check to run.

Write a complete GNU ld linker script for an STM32F407: MEMORY regions, vector table, .text, .data with AT>, .bss, heap and stack reserve, and link-time checks.

Replace the vendor assembly startup file with one C file for a Cortex-M4: vector table, weak aliases, data copy, bss clear and the GCC flags that keep it safe.

Learn the Cortex-M vector table layout: system entries, device IRQs, the Thumb bit, how VTOR finds the table, and why it must sit at the start of flash.

Build an STM32F4 blinky with no HAL: one C file, a short linker script, a vector table and the arm-none-eabi-gcc commands that produce a flashable binary.

Follow a Cortex-M core from power-on to main: the two vector table words it fetches, the reset handler, and the C runtime setup that runs before your code.

Learn fixed-point arithmetic for firmware in C: Q formats, conversion, multiply and divide, saturation, filters, printing and testing, with verified outputs.

The AAPCS rules for 32-bit ARM and Cortex-M: argument and result registers, what a callee must preserve, 64-bit pairs, stack alignment and hard-float.

Compare TinyGo, Zig and Ada for microcontroller firmware: toolchains, blinky programs, memory models, interrupts, C interop and when to choose each.

Learn embedded Rust from an empty directory to flashed, logged, interrupt-driven firmware on a Cortex-M board, with the toolchain, crates and mental model.

How ARM Cortex-M assembly moves data between memory and registers: LDR and STR sizes and addressing, offsets, writeback, and the multi-register LDM and STM.

Learn how a microcontroller bootloader starts, validates and updates firmware, from the Cortex-M reset sequence to safe OTA, rollback and secure boot.
We send one email when a new post is published. No spam.