Roadmap / Foundations
Data Structures & Algorithms
An MCU has only tens of kilobytes of RAM. How you store data decides how stable the system is.
Goal Choose structures that handle data within limited memory and time.
- 01Time and memory complexity
Why computation and memory use come first on a small MCU.
- 02Ring buffer
A circular queue that keeps incoming UART data safe: the bridge between an interrupt and the main loop.
- 03Queues and stacks
What a work queue and a call stack really are, implemented with arrays.
- 04Linked lists and memory pools
Using lists with a pre-allocated pool instead of dynamic allocation.
- 05State machines
Organising complex sequences as states and transitions. The basic tool of firmware design.
- 06Search and lookup tables
Binary search, and precomputed tables for functions such as sine.
- 07CRC and checksums
Writing the calculation that tells you whether data was corrupted in transit.
- 08Fixed-point arithmetic
Q formats: handling fractions with integers on an MCU without an FPU.