Ground Embedded KO Subscribe

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.

  • BasicLevel
  • about 3 weeksat one hour a day
  • 8topics
  • 0labs
  1. 01
    Time and memory complexity

    Why computation and memory use come first on a small MCU.

    Read the note →

  2. 02
    Ring buffer

    A circular queue that keeps incoming UART data safe: the bridge between an interrupt and the main loop.

    Read the note →

  3. 03
    Queues and stacks

    What a work queue and a call stack really are, implemented with arrays.

    Read the note →

  4. 04
    Linked lists and memory pools

    Using lists with a pre-allocated pool instead of dynamic allocation.

    Read the note →

  5. 05
    State machines

    Organising complex sequences as states and transitions. The basic tool of firmware design.

    Read the note →

  6. 06
    Search and lookup tables

    Binary search, and precomputed tables for functions such as sine.

    Read the note →

  7. 07
    CRC and checksums

    Writing the calculation that tells you whether data was corrupted in transit.

    Read the note →

  8. 08
    Fixed-point arithmetic

    Q formats: handling fractions with integers on an MCU without an FPU.

    Read the note →

CHECK TASK

Build a ring buffer for UART reception

Make a ring buffer from a fixed-size array without malloc, and handle the full and empty cases.

If you can tick all three, move on to the next subject. Ticks are saved in this browser only.