Stage 1 of 10 · 6 lessons · ~6 weeks
C for embedded
Learn the parts of C that hardware work depends on: exact-width integers, bitwise operations, pointers, volatile and the memory map of a small chip.
Start: Why C still runs the hardwareLessons· one lesson for each topic, in this order
Do this
- Write set, clear, toggle and test macros for a bit and use them on a variable.
- Rewrite an old exercise using only stdint.h types.
- Trace five pointer snippets on paper, then run them to check.
- Build a program for your board or a simulator and read its flash and RAM use.
- Break a program by removing volatile from an interrupt flag with optimisation on, then fix it.
Start with· follow one of these
- VideoFreeModern Embedded Systems Programming (video course)
Quantum Leaps (Miro Samek) · Intermediate
Free lessons that step down to the machine level: watch the first segment on C, bits, pointers and memory
- CourseFreeCS50: Introduction to Computer Science
Harvard University · Beginner
The weeks on C and memory give you pointers, arrays and malloc explained clearly, free
Practise
Keep handy
Also worth your time
Before moving on: A small C program, compiled for your board or a simulator, that sets, clears and tests bits in a variable standing in for a register, uses only stdint types, and prints its memory use from the build output.

Do the bit exercises until they are boring. Every later stage is registers, masks and flags, and people who are shaky here lose days to bugs that are one wrong operator. Compile for a real chip or a simulator from the first week, not only on your laptop.