Part 1: Why VS Code + Wokwi for Embedded Learning
6 minMost people use technology. Very few actually control it. I want to change that. You're going to learn embedded programming by building something fun. Together, we'll build 'Light Chaser', a classic arcade game where a light bounces back an...
Little Endian vs Big Endian
7 minYou'd think after decades of computing we'd have settled on which end of a number goes first in memory. We haven't. Some processors put the big byte first, some put the little byte first, and both camps have been stubbornly coexisting since...
RAII in C
7 minYou're debugging a production issue at 2am. Memory usage is climbing steadily, the system's getting slower, and somewhere in a 500-line function there's a malloc without a matching free. You've checked every early return. You've traced ever...
How Your Code Talks to Hardware (Memory-Mapped I/O)
8 minThere's something almost magical about the moment you realise that GPIOA->ODR |= (1 << 5) isn't just moving bits around in memory—it's physically changing voltage on a wire, photons leaving an LED, the real world responding to your code. Bu...
Headers and Implementation Files in C
7 minAs C programs grow beyond a single file, you need a way to share code between files without duplicating it everywhere. This is where the split between header files and implementation files comes in. It's a simple convention but one that may...
Functions in C
10 minFunctions are the building blocks of any C program. They let you create a chunk of code, give it a name, and call it whenever you need that behaviour. Understanding how functions work is fundamental to writing C. A function in C has four pa...
Design Patterns in C: Adapter Pattern
7 minThe adapter pattern solves a common problem: you have some code that expects one interface, and some other code that provides a different interface, and you need them to work together without modifying either. The adapter sits in the middle...
What Happens When You Call malloc and free in C
5 minWhen you write malloc(100) in C, you're asking for 100 bytes of memory. A pointer comes back, you use it, and eventually you call free() to give it back. But what's actually happening behind that simple interface? Your program's memory is d...
Understanding the Extern Keyword in C
7 minIf static is about hiding things within a file, extern is about sharing things across files. It's the keyword that lets you say "this variable or function exists, but it's defined somewhere else."Once you understand the difference between a...
The Three Jobs of the Static Keyword in C
7 minThe static keyword in C is one of those things that trips people up because it does different things depending on where you use it. Same keyword, different behaviour. Once you know the three contexts, though, it becomes much more straightfo...
Working with Memory in C/C++
11 minIf you've come from languages like Python, JavaScript, or Java, memory management in C and C++ will feel unfamiliar (and maybe even a little bit scary). Those languages handle memory for you. In C and C++, you're the one in charge. This dir...
Bitwise Operations
7 minI remember the first time I encountered bitwise operations in code. It was many years ago as a fledgling games developer. I was staring at something like flags & 0x04 and thinking, "What is this dark magic?"It looked like the kind of thing...
Inspecting Code That's Running Somewhere Else
6 minIf you've read my earlier post on cross compilation, you'll know that embedded development involves a separation that mobile development abstracts away: your development machine and your target device are fundamentally different systems. Th...
Why embedded systems can't compile their own code
4 minWhen I first started learning embedded systems development, coming from a mobile background, I kept coming across the term 'cross compilation'. Understanding this concept felt important, not only because it's mentioned in the first chapter...
Understanding the volatile keyword
8 minIf you've spent any time in embedded development in C, you've likely encountered the volatile keyword. And if you're like me, you've been bitten by infuriating bugs when you forgot to use it (like why does my code break when I turn optimisa...













