Cortex‑M7 without hardware part 7: loose ends

This is Part 7 — and the final part — of my Cortex‑M7 without hardware series. Parts 1 through 6 built minimal bare-metal projects that would boot on Renode and QEMU. Minimal was the key word: the linker script had no alignment or symbol exports, the startup code skipped .data copying and .bss zeroing, and main.cpp had to talk to the host through hand-rolled inline assembly. Those shortcuts were fine for proving the concept, but they left the project in a state where most of the C, and especially C++, language was technically broken. This post ties up all the loose ends. By the end, both projects have: Working initialized globals — .data is copied from flash to RAM at startup Guaranteed zero-initialized globals — .bss is zeroed before main() C++ global constructors — .init_array is iterated so static objects are constructed Standard library I/O — printf and exit work without hand-rolled assembly ...

March 14, 2026 · 15 min · Hannupekka Sormunen