Cortex-M7 without hardware part 2: startup

This is the second post of my Cortex-M7 without hardware series. In the first part I nailed down the linker script and memory map. Now it is time to take a look at the other half of “boot”: the vector table and the Reset_Handler. ...

December 19, 2025 · 3 min · Hannupekka Sormunen

Cortex-M7 without hardware part 1: linker script

This is the first post in my Cortex-M7 without hardware series, which aims to build an Executable and Linkable Format executable (ELF) and run it without hardware (using emulated / simulated STM32F746 microcontroller unit. 1). ...

December 18, 2025 · 5 min · Hannupekka Sormunen

Naming Conventions for Embedded C++

When working with embedded systems, naming might seem like a small detail, however it is not. Good naming conventions make code readable, maintainable, and portable. Poor naming, like Uart1 or Uart2, ties logic to hardware details, making future changes painful. Semantic names such as UartDebug or UartModem tell you what the peripheral in question does, not where it sits on the MCU. I’ll explore why semantic naming matters, provide a naming table for all layers, one of which I will be using in upcoming examples when writing more about embedded C++, and present sample scenarios that clarify the benefits. These recommendations are based on my experience and general best practices in embedded C++ development. ...

November 21, 2025 · 3 min · Hannupekka Sormunen

Empty policies: [[no_unique_address]] and EBO

On my previous post about C++ Policies, a policy-based design was used for comparators and loggers, which are stateless function objects (they only call a single function). These types are empty, but as members they still occupy space because C++ guarantees distinct addresses for distinct subobjects. With C++20’s [[no_unique_address]] or Empty Base Optimization (EBO), programmers can make these truly zero-cost, which is huge for small, hot objects like iterators or adapters.1 ...

November 14, 2025 · 3 min · Hannupekka Sormunen

Policies

I’ve been reading about templates a lot lately and kept seeing the word policy. Which made me realized I wanted a single post that answers the question: What is a policy? Why do C++ sources keep mentioning them? How do compile-time policies (templates) compare to runtime strategies (virtuals/std::function)? And when should which be used? ...

November 14, 2025 · 5 min · Hannupekka Sormunen

Concepts

Introduction C++20 shipped with Concepts, a long-awaited way to express constraints on template parameters right where they live. Concepts turn the old “SFINAE and traits soup” into clear, readable predicates that the compiler can check for you. Anyone who has wrestled with a 20-line enable_if just to say “this needs to be integral” will appreciate this. ...

November 6, 2025 · 3 min · Hannupekka Sormunen

Canonical Project Structure

If you’ve ever stared at a blank folder wondering where do I even start?, you’re not alone. I’ve been there more than once. ...

September 21, 2025 · 3 min · Hannupekka Sormunen