📖 Authoritative Engineering Reference

Technical Glossary & Hardware Concepts

A comprehensive architectural reference defining the acronyms, CPU registers, low-level idioms, memory layouts, toolchain concepts, and safety standards explored across all 116 curriculum projects.

68 Technical Terms
5 Core Engineering Domains
116 Cross-Referenced Projects
100% Zero-Cost & Bare-Metal Focus
Filter Domain:
Alphabetical Jump:
Showing 68 of 68 Technical Terms
A

AAPCS

ARM Architecture Procedure Call Standard
⚡ Embedded & CPU Architecture
ARM Cortex-M Calling Convention Registers ABI
Definition & Concept:

The official ABI standard governing how subroutines and functions pass parameters, return values, and preserve registers in ARM processors.

⚡ Embedded Systems & Low-Level Reality

Under AAPCS, the first 4 integer or pointer arguments (up to 32 bits each) are passed directly in CPU registers R0–R3 without touching RAM. Return values are passed in R0 (and R1 for 64-bit). The return address is stored in the Link Register (R14/LR). Keeping function parameter counts to 4 or fewer eliminates stack memory push/pop overhead completely.

ADL

Argument-Dependent Lookup (Koenig Lookup)
📚 Modern C++ Mechanics & Idioms
C++ Language Name Lookup Namespaces STL
Definition & Concept:

A C++ compiler name lookup rule that searches the namespaces of a function's arguments in addition to the local scope when resolving unqualified function calls.

⚡ Embedded Systems & Low-Level Reality

Enables idiomatic, zero-cost customization points such as swap(a, b) (which selects specialized hardware or container swap functions before falling back to std::swap) and overloaded stream/math operators without requiring explicit namespace prefixes.

alignas / alignof

Memory Alignment Specifier & Operator
📚 Modern C++ Mechanics & Idioms
C++11 Memory Alignment DMA Cache Line
Definition & Concept:

alignas forces a variable or struct to align on a specific byte boundary in memory. alignof queries the natural alignment requirements of a given type.

⚡ Embedded Systems & Low-Level Reality

Hardware peripherals such as DMA controllers, cache lines (typically 32 or 64 bytes), and vector units require buffers to be placed at specific memory boundaries (e.g. alignas(32) uint8_t dma_buf[512];). Misaligned memory accesses on ARM Cortex-M0/M3 can trigger hardware usage faults or require multi-cycle bus transactions.

AoS vs SoA

Array of Structures vs Structure of Arrays
💾 Memory, Storage & Real-Time
Data Layout SIMD Cache Lines Performance
Definition & Concept:

Two distinct memory organization patterns: AoS stores complete struct objects consecutively in memory; SoA separates each struct field into its own contiguous parallel array.

⚡ Embedded Systems & Low-Level Reality

In embedded DSP and graphics processing, SoA maximizes cache locality when algorithms only read one or two specific fields across all elements (e.g. updating only X coordinates), enabling contiguous burst reads and SIMD execution without loading unused padding bytes.

APSR

Application Program Status Register
⚡ Embedded & CPU Architecture
ARM Cortex-M ALU Condition Flags Branching
Definition & Concept:

The hardware CPU status register that contains the arithmetic condition flags resulting from the most recent ALU operation.

⚡ Embedded Systems & Low-Level Reality

Holds the Negative (N), Zero (Z), Carry (C), Overflow (V), and Q (Saturation) flags. Conditional branch instructions (BEQ, BNE, BGT, BLT) directly evaluate these flags to make zero-latency branch decisions. Mispredicting or stalling conditional checks causes CPU pipeline bubbles.

AUTOSAR C++14

Automotive Open System Architecture C++ Guidelines
🛡️ Toolchains, Linkers & Safety Standards
Automotive Safety-Critical MISRA ISO 26262
Definition & Concept:

An authoritative coding standard for using Modern C++ (C++14) in safety-critical automotive systems (e.g. ADAS, engine controllers, braking ECUs).

⚡ Embedded Systems & Low-Level Reality

Strictly forbids non-deterministic runtime operations including raw new/delete, dynamic exceptions without bounded catch times, recursion (due to stack overflow risk), and unbounded loops. Mandates static allocation, deterministic response times, and static analysis enforcement.

B

Branch Prediction & Pipeline Flush

CPU Instruction Pipeline Flushes & Branch Penalties
⚡ Embedded & CPU Architecture
CPU Architecture Pipeline Thumb-2 Optimization
Definition & Concept:

When a CPU encounters a conditional jump (if/else, switch), branch prediction attempts to speculate the next instruction. If mispredicted, the processor must flush all instructions in the pipeline and reload from the jump target.

⚡ Embedded Systems & Low-Level Reality

In Cortex-M3/M4/M7 processors with 3-to-6 stage pipelines, every mispredicted branch incurs a 2-to-5 clock cycle penalty. In high-frequency interrupt service routines (ISRs) and tight DSP loops, branchless code and C++20 [[likely]]/[[unlikely]] annotations eliminate costly pipeline stalls.

.bss Section

Block Started by Symbol
🛡️ Toolchains, Linkers & Safety Standards
ELF Linker Memory Sections SRAM
Definition & Concept:

A memory section in compiled ELF binaries dedicated to uninitialized global and static variables.

⚡ Embedded Systems & Low-Level Reality

The .bss section occupies 0 bytes in Flash ROM storage. During startup before main() runs, the CRT0 startup code zeroes out the entire .bss RAM region in a tight loop. Grouping zero-initialized buffers into .bss saves vital Flash space.

BusFault

ARM Cortex-M Bus Error Exception
⚡ Embedded & CPU Architecture
Fault Handling ARM Cortex-M AHB/APB Hardware Error
Definition & Concept:

A hardware CPU fault triggered when an error occurs during an instruction fetch or data access on the processor's system bus (AHB/APB).

⚡ Embedded Systems & Low-Level Reality

Commonly caused by dereferencing invalid memory addresses, accessing unclocked hardware peripherals (forgetting to enable the APB peripheral clock in RCC registers), or attempting unaligned 32-bit accesses on strict buses. Logged in the BusFault Status Register (BFSR).

C

Cache Line & Locality

Spatial and Temporal CPU Cache Memory Blocks
💾 Memory, Storage & Real-Time
Cache SRAM Locality Performance
Definition & Concept:

The fundamental unit of data transfer between main memory (SRAM/DRAM) and CPU L1/L2 cache (typically 32 or 64 bytes).

⚡ Embedded Systems & Low-Level Reality

When a single byte is accessed, the hardware cache controller loads the entire 32- or 64-byte line. Sequential array traversals exhibit high spatial locality (cache hits), running at ~1 cycle per access. In contrast, linked lists and pointer chasing cause frequent cache misses, stalling the CPU for 10-100+ cycles per dereference.

constexpr / consteval / constinit

Compile-Time Evaluation & Initialization Qualifiers
📚 Modern C++ Mechanics & Idioms
C++11/14/20 Zero-SRAM Flash ROM Optimization
Definition & Concept:

constexpr marks values or functions that can be computed at compile-time. consteval guarantees immediate compile-time execution. constinit ensures static initialization without dynamic startup code.

⚡ Embedded Systems & Low-Level Reality

Precomputing mathematical tables (trigonometric LUTs, CRC tables, state machine transitions) at compile time consumes zero runtime CPU cycles and places the result directly in Flash ROM (.rodata), eliminating RAM consumption and boot-time calculation overhead.

CORDIC

Coordinate Rotation Digital Computer
⚡ Embedded & CPU Architecture
Hardware Accelerator Trigonometry DSP ARM
Definition & Concept:

A hardware iterative algorithm / coprocessor used in embedded microcontrollers (e.g. STM32G4) to compute trigonometric, hyperbolic, and logarithmic functions using only additions and bit-shifts.

⚡ Embedded Systems & Low-Level Reality

Provides single-cycle or fixed microcode computation of sin(), cos(), atan2(), and polar-to-Cartesian conversions without requiring costly floating-point Taylor series approximations or large RAM lookup tables.

CRTP

Curiously Recurring Template Pattern
📚 Modern C++ Mechanics & Idioms
C++ Templates Static Polymorphism Zero-Cost VTable-Free
Definition & Concept:

A C++ template design idiom where a derived class inherits from a base class template instantiated with the derived class itself as a template argument (class Derived : public Base<Derived>).

⚡ Embedded Systems & Low-Level Reality

Provides polymorphic interface behavior at compile time without any virtual functions. This completely avoids the VTable and VPtr RAM overhead (saving 4 bytes per object) and enables full function inlining, eliminating indirect jump instruction delays.

Cyclomatic Complexity

McCabe Software Complexity Metric (ISO 26262 / MISRA)
🛡️ Toolchains, Linkers & Safety Standards
Safety Standards Testing Control Flow MISRA
Definition & Concept:

A quantitative software metric measuring the number of linearly independent paths through a program's source code.

⚡ Embedded Systems & Low-Level Reality

Safety standards like ISO 26262 (automotive) and IEC 61508 (industrial) mandate a cyclomatic complexity threshold (typically $\le 10$ to $15$ per function). Lower complexity ensures every branch path can be fully tested with 100% MC/DC (Modified Condition/Decision Coverage) on target hardware.

D

.data Section

Initialized Data Memory Section
🛡️ Toolchains, Linkers & Safety Standards
ELF Linker Memory Sections Flash & SRAM
Definition & Concept:

The memory section holding global and static variables that are explicitly initialized to non-zero values (e.g. int sensor_baud = 115200;).

⚡ Embedded Systems & Low-Level Reality

Requires dual storage: the initial values are stored in non-volatile Flash ROM (LMA - Load Memory Address). At startup, the reset handler copies these values byte-for-byte from Flash into volatile SRAM (VMA - Virtual Memory Address). Minimizing non-const globals directly reduces boot time and SRAM usage.

DMA

Direct Memory Access Controller
⚡ Embedded & CPU Architecture
Hardware Peripheral Bus Master Zero-CPU Buffers
Definition & Concept:

A dedicated hardware engine on microcontrollers that transfers data directly between peripherals (ADC, SPI, UART) and memory (SRAM) without CPU intervention.

⚡ Embedded Systems & Low-Level Reality

Allows multi-kilobyte sensor or audio data streams to be received in circular ring buffers in the background while the CPU sleeps in low-power mode (WFI) or executes other real-time tasks. Requires contiguous, properly aligned memory buffers.

DWARF / .eh_frame

Debugging Format & Exception Unwinding Table
🛡️ Toolchains, Linkers & Safety Standards
Compilers Exceptions ROM Overhead DWARF
Definition & Concept:

The metadata format embedded in binaries to describe stack frames, local variable offsets, and exception handling unwinding instructions.

⚡ Embedded Systems & Low-Level Reality

Enabling C++ exceptions generates the .eh_frame and .gcc_except_table sections in Flash ROM, causing a 15KB–40KB ROM code size penalty on 32-bit MCUs even if no exception is ever thrown. For this reason, bare-metal systems commonly compile with -fno-exceptions.

E

EEPROM

Electrically Erasable Programmable Read-Only Memory
💾 Memory, Storage & Real-Time
Non-Volatile Storage Hardware Endurance
Definition & Concept:

A non-volatile storage technology that allows individual bytes to be erased and rewritten repeatedly (typically rated for 100,000 to 1,000,000 write cycles).

⚡ Embedded Systems & Low-Level Reality

Used for persistent configuration parameters, device serial numbers, and calibration offsets. Writes require significant time (3–10ms per byte) and block or require non-blocking I2C/SPI drivers with CRC checks.

ELF

Executable and Linkable Format
🛡️ Toolchains, Linkers & Safety Standards
Toolchain Linker Binary Format Embedded
Definition & Concept:

The standard binary file format generated by cross-compilers (e.g. arm-none-eabi-gcc) containing compiled code, symbols, section headers, and debug data.

⚡ Embedded Systems & Low-Level Reality

ELF files are processed by objcopy to generate flat binary (.bin) or Intel Hex (.hex) files for flashing directly onto physical microcontroller flash memory via JTAG/SWD debuggers.

Erase-Remove Idiom

STL Container Element Removal Pattern
📐 Data Structures & Algorithms
STL C++11/20 std::vector Optimization
Definition & Concept:

A C++ standard idiom combining std::remove() (which shifts valid elements to the front) with container.erase() (which adjusts container size) in a single linear $O(N)$ pass.

⚡ Embedded Systems & Low-Level Reality

Avoids quadratic $O(N^2)$ memory copying that occurs when erasing elements individually in a naive loop. In C++20, replaced by the cleaner non-member std::erase(vec, value).

etl::vector

Embedded Template Library Fixed-Capacity Vector
📐 Data Structures & Algorithms
ETL Zero-Heap Deterministic MISRA
Definition & Concept:

A container from the Embedded Template Library (ETL) that provides the full API of std::vector but stores elements in a statically allocated buffer with a fixed maximum capacity.

⚡ Embedded Systems & Low-Level Reality

Guarantees zero heap allocation, eliminates memory fragmentation risks, ensures deterministic execution time, and provides MISRA/AUTOSAR compliance for safety-critical real-time applications.

F

FatFS

FAT File System Module for Embedded Microcontrollers
💾 Memory, Storage & Real-Time
File System SD Card Storage FAT32
Definition & Concept:

A lightweight, generic FAT/exFAT file system module designed specifically for resource-constrained 8/16/32-bit microcontrollers.

⚡ Embedded Systems & Low-Level Reality

Enables microcontrollers to read and write SD cards, USB drives, and eMMC chips interoperably with PC operating systems (Windows, Linux, macOS) using standard FAT formats.

Fixed-Block Memory Pool Allocator

Deterministic Fixed-Size Pool Allocator
💾 Memory, Storage & Real-Time
Memory Management Real-Time Zero-Fragmentation Deterministic
Definition & Concept:

A custom memory allocator that divides a pre-allocated static RAM buffer into equal, fixed-size blocks (e.g. 64 bytes each) managed via a free-list.

⚡ Embedded Systems & Low-Level Reality

Provides deterministic $O(1)$ allocation and deallocation without searching or splitting blocks. Completely prevents external memory fragmentation, making it safe for long-running embedded systems.

Flash Memory (NOR / QSPI)

Non-Volatile NOR Flash & Quad-SPI Serial Flash
💾 Memory, Storage & Real-Time
Flash ROM QSPI Execute-in-Place (XIP) Non-Volatile
Definition & Concept:

Non-volatile semiconductor storage where code and static read-only data are stored. NOR Flash supports random-access byte reading, enabling Execute-in-Place (XIP).

⚡ Embedded Systems & Low-Level Reality

Flash must be erased in entire sectors or blocks before new data can be written (turning 1s into 0s on write, and resetting to 1s on erase). Write operations are orders of magnitude slower than SRAM and wear down cells over time.

Flat Map / Sorted Flat Vector

Contiguous Associative Sorted Container
📐 Data Structures & Algorithms
Cache Locality Binary Search Zero-Heap C++23 std::flat_map
Definition & Concept:

An associative key-value container implemented as a single contiguous array sorted by key, performing lookups via binary search (std::lower_bound).

⚡ Embedded Systems & Low-Level Reality

Provides $O(\log N)$ lookup with optimal cache locality because elements are stored contiguously in memory, avoiding the pointer-chasing overhead and 24-byte per-node heap bloat of Red-Black trees (std::map).

-fno-rtti & -fno-exceptions

GCC/Clang Embedded Optimization Flags
🛡️ Toolchains, Linkers & Safety Standards
Compiler Flags Embedded ROM Optimization Zero-Overhead
Definition & Concept:

Compiler flags that disable Runtime Type Information (typeid and dynamic_cast) and C++ exception handling (try/catch/throw) respectively.

⚡ Embedded Systems & Low-Level Reality

Disabling RTTI saves typenames and type descriptors in Flash ROM; disabling exceptions removes .eh_frame tables, reducing overall binary size by 15KB–50KB and ensuring deterministic real-time execution on microcontrollers.

Freestanding vs Hosted Environment

Bare-Metal Freestanding C++ Execution Environment
🛡️ Toolchains, Linkers & Safety Standards
Standard Compliance Bare-Metal No-OS CRT0
Definition & Concept:

In C++, a hosted environment includes a full operating system with all standard library facilities (threads, files, processes), while a freestanding environment executes on bare metal without an OS.

⚡ Embedded Systems & Low-Level Reality

Freestanding C++ requires custom startup code (reset handlers, CRT0), custom linker scripts, and only guarantees access to core language headers (<cstdint>, <cstddef>, <type_traits>, <limits>).

H

HardFault

ARM Cortex-M Generic Unhandled Hardware Exception
⚡ Embedded & CPU Architecture
Fault Handling ARM Cortex-M Exceptions Safety
Definition & Concept:

The top-level hardware exception handler invoked when a fault occurs that cannot be handled by another specialized handler (or when another fault handler escalates).

⚡ Embedded Systems & Low-Level Reality

Triggered by null-pointer dereferences, executing invalid opcode bytes, unaligned memory accesses when unaligned traps are enabled, or stack overflows corrupting the vector table. Inspection requires reading the HardFault Status Register (HFSR) and Configurable Fault Status Register (CFSR).

Heap Fragmentation

Dynamic Memory External & Internal Fragmentation
💾 Memory, Storage & Real-Time
Memory Hazards Heap malloc/new Real-Time
Definition & Concept:

The phenomenon where free heap memory is broken into many small, non-contiguous pieces over time through repeated allocations and deallocations of varying sizes.

⚡ Embedded Systems & Low-Level Reality

Can cause an allocation (malloc or new) to fail even when total free RAM exceeds the requested size. In mission-critical 24/7 firmware, dynamic heap allocation is strictly avoided or restricted to system bootup.

L

[[likely]] / [[unlikely]]

C++20 Branch Prediction Attributes
📚 Modern C++ Mechanics & Idioms
C++20 Branch Prediction Pipeline Optimization
Definition & Concept:

C++20 standard attributes applied to conditional branches to hint to the compiler which execution path is most or least probable.

⚡ Embedded Systems & Low-Level Reality

Guides the compiler to place the hot/likely execution path in straight-line contiguous machine code, avoiding taken-branch instruction fetch pipeline stalls on the processor.

Linker Script (.ld)

GNU Linker Memory Mapping Script
🛡️ Toolchains, Linkers & Safety Standards
Linker Memory Map Flash SRAM
Definition & Concept:

A script that instructs the GNU linker (ld) how to map compiled sections (.text, .rodata, .data, .bss) into the microcontroller's physical memory regions (Flash ROM and SRAM).

⚡ Embedded Systems & Low-Level Reality

Defines the exact origin and length of Flash and SRAM, sets the initial stack pointer address, places the interrupt vector table at address 0x08000000 or 0x00000000, and defines memory boundaries.

LittleFS

Fail-Safe Embedded Flash File System
💾 Memory, Storage & Real-Time
File System Flash Wear Leveling Power-Cut Resilient
Definition & Concept:

A high-integrity, fail-safe file system designed specifically for microcontrollers with external SPI/QSPI NOR and NAND Flash memory.

⚡ Embedded Systems & Low-Level Reality

Provides power-cut resilience (guarantees file system integrity even if power is lost mid-write), dynamic wear leveling across flash erase blocks, and bounded RAM/ROM footprints.

M

MemManage Fault

ARM Cortex-M Memory Management / MPU Fault
⚡ Embedded & CPU Architecture
Fault Handling MPU Security ARM Cortex-M
Definition & Concept:

A hardware memory protection fault generated when an instruction or data access violates rules configured in the Memory Protection Unit (MPU).

⚡ Embedded Systems & Low-Level Reality

Triggered when user-level RTOS tasks attempt to execute code in SRAM (No-Execute NX violation), write to read-only Flash, or access private memory regions belonging to another task or the kernel.

MISRA C++

Motor Industry Software Reliability Association C++ Standard
🛡️ Toolchains, Linkers & Safety Standards
Safety-Critical Automotive Medical Static Analysis
Definition & Concept:

An international set of software development guidelines for writing safe, secure, and reliable C++ code in embedded and safety-critical environments.

⚡ Embedded Systems & Low-Level Reality

Rules restrict unsafe C++ features such as implicit type conversions, raw pointers without bounds checks, unbounded recursion, unhandled enum switches, and memory leaks.

MMIO

Memory-Mapped Input/Output
⚡ Embedded & CPU Architecture
Hardware Registers Peripherals Pointers volatile
Definition & Concept:

The architectural technique where hardware peripheral registers (GPIO, UART, Timers, SPI) are mapped directly into the CPU's physical memory address space.

⚡ Embedded Systems & Low-Level Reality

Reading or writing to a specific memory address (e.g. *(volatile uint32_t*)0x40020000) interacts directly with physical hardware pins and registers. Always requires the volatile qualifier to prevent the compiler from optimizing away repeated hardware reads/writes.

MPU

Memory Protection Unit
⚡ Embedded & CPU Architecture
Hardware Security Isolation RTOS ARM Cortex-M
Definition & Concept:

A hardware peripheral block on ARM Cortex-M microcontrollers that divides memory into 8 or 16 programmable regions with distinct access permissions.

⚡ Embedded Systems & Low-Level Reality

Enforces spatial isolation between RTOS tasks, prevents stack overflow from corrupting neighboring memory, and flags buffer overruns with immediate hardware MemManage exceptions.

N

Natural Alignment & Struct Padding

Memory Byte Alignment & Padding Waste
💾 Memory, Storage & Real-Time
Memory Layout Struct Padding SRAM Optimization
Definition & Concept:

The hardware requirement that data types be placed at memory addresses that are integer multiples of their size (e.g. 4-byte uint32_t must be at addresses ending in 0x0, 0x4, 0x8, 0xC).

⚡ Embedded Systems & Low-Level Reality

Improperly ordered struct members cause the compiler to insert padding bytes, wasting up to 50% of SRAM. Reordering members from largest to smallest eliminates padding waste without requiring packed attributes that penalize bus performance.

[[nodiscard]]

C++17 Unused Return Value Warning Attribute
📚 Modern C++ Mechanics & Idioms
C++17 Safety Error Handling MISRA
Definition & Concept:

A standard C++ attribute that causes the compiler to emit a warning if a function's return value (e.g. error code or status enum) is discarded by the caller.

⚡ Embedded Systems & Low-Level Reality

Enforces error handling at compile time, preventing bugs where firmware inadvertently ignores peripheral transmission errors or sensor timeout status codes.

noexcept

Non-Throwing Function Specification
📚 Modern C++ Mechanics & Idioms
C++11 Exceptions Optimization Move Semantics
Definition & Concept:

A C++ keyword declaring that a function is guaranteed not to throw exceptions.

⚡ Embedded Systems & Low-Level Reality

Allows the compiler to omit exception-handling unwinding landing pads and vector reallocation copies (enabling move-if-noexcept optimizations), significantly reducing generated code size and execution time.

P

PC (R15)

Program Counter (CPU Register R15)
⚡ Embedded & CPU Architecture
ARM Cortex-M Registers Instruction Fetch CPU
Definition & Concept:

The hardware register holding the memory address of the next instruction being fetched for execution.

⚡ Embedded Systems & Low-Level Reality

In ARM Cortex-M Thumb-2 state, bit 0 of the PC must always be 1 to indicate Thumb execution mode; jumping to an address with bit 0 set to 0 triggers an immediate UsageFault (INVSTATE).

Placement-New

In-Place Object Construction
📚 Modern C++ Mechanics & Idioms
Memory Management C++ Idiom Zero-Heap Static Pools
Definition & Concept:

A form of the new operator (new (address) ClassName(...)) that constructs an object inside a pre-allocated memory buffer without performing dynamic heap allocation.

⚡ Embedded Systems & Low-Level Reality

Enables object-oriented C++ classes with constructors to be instantiated inside statically allocated SRAM pools, memory-mapped peripherals, or DMA buffers with zero heap allocation.

Pointer Decay

Array-to-Pointer Implicit Conversion
📚 Modern C++ Mechanics & Idioms
Arrays Pointers Type Safety std::span
Definition & Concept:

The automatic conversion of a C-style array to a raw pointer to its first element when passed into a function by value, losing all compile-time size information.

⚡ Embedded Systems & Low-Level Reality

A major source of buffer overflow vulnerabilities in embedded C/C++. Modern C++ replaces decayed arrays with std::span<T> or std::array<T, N> to preserve bounds information with zero runtime overhead.

R

RAII

Resource Acquisition Is Initialization
📚 Modern C++ Mechanics & Idioms
C++ Core Resource Management Hardware Locks Safety
Definition & Concept:

A fundamental C++ design pattern where resource allocation (memory, mutex locks, hardware peripheral clocks) is tied to object lifetime via constructors and automatically released in destructors upon scope exit.

⚡ Embedded Systems & Low-Level Reality

Guarantees that hardware peripherals (SPI buses, DMA channels, interrupts) are safely closed, disabled, or unlocked even when functions exit early due to return statements or errors.

Red-Black Tree

Self-Balancing Binary Search Tree (`std::map` / `std::set`)
📐 Data Structures & Algorithms
Data Structures STL std::map Binary Search Tree
Definition & Concept:

A self-balancing binary search tree algorithm that guarantees $O(\log N)$ worst-case search, insertion, and deletion time complexity.

⚡ Embedded Systems & Low-Level Reality

Standard library containers like std::map and std::set use node-based Red-Black trees. Each node incurs a 3-pointer + color byte overhead (24–32 bytes/node) and triggers an individual dynamic heap allocation per element, making them poorly suited for cache performance and RAM-constrained MCUs.

Ring Buffer / Circular FIFO

Circular First-In First-Out Buffer
📐 Data Structures & Algorithms
Data Structures UART/SPI Interrupts Zero-Copy
Definition & Concept:

A fixed-size array treated as circular using head and tail indices with modulo arithmetic or bitmask wrapping.

⚡ Embedded Systems & Low-Level Reality

The gold standard for asynchronous UART/SPI communication and interrupt service routines (ISRs). Enables lock-free single-producer single-consumer (SPSC) data transfer between hardware interrupts and main processing loops without dynamic memory.

.rodata Section

Read-Only Data Section
🛡️ Toolchains, Linkers & Safety Standards
ELF Linker Flash ROM Zero-SRAM
Definition & Concept:

The memory section containing read-only constants, string literals, and virtual method tables (VTables).

⚡ Embedded Systems & Low-Level Reality

Mapped directly to non-volatile Flash ROM, consuming 0 bytes of precious SRAM. Marking lookup tables and configuration strings as const or constexpr ensures they are placed in .rodata.

Rule of Three / Five / Zero

C++ Resource Management Special Member Functions
📚 Modern C++ Mechanics & Idioms
C++11 Special Members Destructors Move Semantics
Definition & Concept:

A C++ design guideline dictating that if a class manages resources and defines a destructor, copy constructor, or copy assignment, it should explicitly define all three (C++98) or all five (including move constructor and move assignment in C++11), or none (Rule of Zero).

⚡ Embedded Systems & Low-Level Reality

Prevents double-free errors, hardware register lock leaks, and shallow-copy memory corruption when objects managing hardware peripherals or static buffers are passed or returned.

RVO & NRVO

Return Value Optimization & Named RVO
📚 Modern C++ Mechanics & Idioms
Compilers Optimization Zero-Copy Stack
Definition & Concept:

A compiler optimization (mandatory copy elision in C++17) where a function returning an object constructs it directly inside the storage allocated by the caller's stack frame.

⚡ Embedded Systems & Low-Level Reality

Eliminates temporary object construction, copy/move constructors, and destruction overhead, enabling large structs and buffers to be returned by value with zero runtime copy cost.

S

Saturating Math (QADD / QSUB)

Non-Wrapping Fixed-Point DSP Arithmetic
⚡ Embedded & CPU Architecture
ARM Cortex-M DSP ALU Arithmetic Safety
Definition & Concept:

Arithmetic operations that clamp results to the maximum or minimum representable values upon overflow or underflow instead of wrapping around.

⚡ Embedded Systems & Low-Level Reality

Essential in digital signal processing (DSP), motor control, and audio processing to prevent catastrophic audio clipping or motor control loop inversions. Executed in a single cycle via ARM DSP instructions (QADD, QSUB, SSAT, USAT).

SP (R13 - MSP / PSP)

Stack Pointer (Main Stack Pointer & Process Stack Pointer)
⚡ Embedded & CPU Architecture
ARM Cortex-M Registers RTOS Stack
Definition & Concept:

The CPU register pointing to the current top of the descending call stack in SRAM.

⚡ Embedded Systems & Low-Level Reality

ARM Cortex-M cores feature dual banked stack pointers: MSP (Main Stack Pointer, used for bootup and interrupt service routines) and PSP (Process Stack Pointer, used by user-space RTOS tasks). This dual architecture isolates task stack overflows from crashing kernel interrupt handlers.

SRAM

Static Random-Access Memory
💾 Memory, Storage & Real-Time
Memory Volatile SRAM Microcontroller
Definition & Concept:

Fast, volatile semiconductor memory that stores variables, stacks, heaps, and runtime buffers as long as power is supplied.

⚡ Embedded Systems & Low-Level Reality

Typically scarce in microcontrollers (ranging from 2KB on low-end MCUs to 512KB on high-end Cortex-M7). Every global variable, stack frame, and struct member must be engineered to minimize SRAM consumption.

Static Initialization Order Fiasco

Cross-Translation-Unit Global Object Initialization Order Hazard
📚 Modern C++ Mechanics & Idioms
C++ Idiom Initialization Singletons Safety
Definition & Concept:

A critical C++ bug where the initialization order of global/static variables across different translation units (.cpp files) is undefined, potentially causing one global object to access an uninitialized global object during startup.

⚡ Embedded Systems & Low-Level Reality

Commonly occurs when hardware driver objects (e.g. UartDriver) attempt to log to an uninitialized console object on bootup. Solved by Meyers' Singleton (lazy initialization of a function-local static).

std::expected<T, E>

C++23 Deterministic Tagged Value/Error Return Type
📚 Modern C++ Mechanics & Idioms
C++23 Error Handling Zero-Cost Deterministic
Definition & Concept:

A standard library vocabulary type that represents either an expected value of type T or an unexpected error of type E without using exceptions.

⚡ Embedded Systems & Low-Level Reality

Provides type-safe, deterministic error handling with zero ROM overhead from exception tables and zero heap allocation, making it the preferred modern error model for embedded firmware.

std::span

C++20 Non-Owning Contiguous Memory View
📚 Modern C++ Mechanics & Idioms
C++20 Bounds Safety Zero-Copy Arrays
Definition & Concept:

A lightweight non-owning reference to a contiguous sequence of objects (stores only a pointer and a length).

⚡ Embedded Systems & Low-Level Reality

Eliminates C-style array pointer decay by passing bounds information cleanly into functions, working seamlessly across C arrays, std::array, and DMA buffers with zero allocation overhead.

std::string_view

C++17 Non-Owning String Slice Reference
📚 Modern C++ Mechanics & Idioms
C++17 Zero-Allocation Flash Strings Optimization
Definition & Concept:

A non-owning view of a character string consisting of a pointer to character data and a length count.

⚡ Embedded Systems & Low-Level Reality

Allows string slicing and parsing directly over Flash ROM string literals (.rodata) or UART receive buffers without triggering dynamic heap memory allocation or copying.

std::unique_ptr

Exclusive Ownership Smart Pointer
📚 Modern C++ Mechanics & Idioms
C++11 Smart Pointers RAII Zero-Cost
Definition & Concept:

A smart pointer that owns and manages another object through a pointer and disposes of that object when the std::unique_ptr goes out of scope.

⚡ Embedded Systems & Low-Level Reality

Incurs zero memory overhead compared to a raw C pointer (sizeof(unique_ptr<T>) == sizeof(T*)). With custom deleters, provides automatic RAII management of hardware locks and peripheral clocks.

SysTick

ARM Cortex-M System Timer Peripheral
⚡ Embedded & CPU Architecture
ARM Cortex-M Timers RTOS Interrupts
Definition & Concept:

A standardized 24-bit down-counting hardware timer integrated directly inside the core of every ARM Cortex-M processor.

⚡ Embedded Systems & Low-Level Reality

Provides the periodic system tick interrupt (typically configured for 1ms intervals) that drives RTOS kernel context switches, HAL_Delay() timing, and software timer callbacks.

T

.text Section

Executable Code Memory Section
🛡️ Toolchains, Linkers & Safety Standards
ELF Linker Flash ROM Machine Code
Definition & Concept:

The memory section in binary files where compiled CPU machine code instructions reside.

⚡ Embedded Systems & Low-Level Reality

Stored in and executed directly from non-volatile Flash ROM on microcontrollers, consuming zero SRAM space.

Thumb-2

ARM Mixed 16-Bit / 32-Bit Instruction Set Architecture
⚡ Embedded & CPU Architecture
ARM Cortex-M ISA Code Density Performance
Definition & Concept:

The core instruction set architecture utilized by all ARM Cortex-M processors, dynamically combining high-density 16-bit instructions with powerful 32-bit instructions.

⚡ Embedded Systems & Low-Level Reality

Delivers up to 35% better code density than pure 32-bit ARM code while maintaining full 32-bit performance, fitting complex modern firmware into constrained Flash ROM budgets.

TRNG

True Random Number Generator Peripheral
⚡ Embedded & CPU Architecture
Hardware Peripheral Cryptography Entropy Security
Definition & Concept:

A dedicated hardware peripheral that harvests true physical entropy (such as thermal electronic noise and ring oscillator jitter) to produce cryptographically secure random numbers.

⚡ Embedded Systems & Low-Level Reality

Unlike software pseudorandom algorithms (rand() / PRNG) which repeat predictable sequences if not seeded properly, hardware TRNGs provide unpredictable random numbers essential for cryptographic keys, TLS sessions, and secure boot authentication.

U

Undefined Behavior (UB)

Language Unspecified Non-Deterministic Execution
📚 Modern C++ Mechanics & Idioms
C++ Standard UB Safety Compiler Optimizations
Definition & Concept:

Situations in C++ where the language specification imposes no requirements, allowing the compiler to optimize under the assumption that the condition can never occur.

⚡ Embedded Systems & Low-Level Reality

Signed integer overflow, out-of-bounds pointer indexing, and strict aliasing violations allow aggressive compiler optimizations to silently eliminate critical safety checks or crash the microcontroller in unpredictable ways.

UsageFault

ARM Cortex-M Program Execution Fault
⚡ Embedded & CPU Architecture
Fault Handling ARM Cortex-M Exceptions Instructions
Definition & Concept:

A hardware fault triggered by execution errors such as undefined instructions, unaligned memory accesses (when unaligned trap is enabled), or division by zero (when DIVBYZERO trap is enabled).

⚡ Embedded Systems & Low-Level Reality

Enabling the DIV_0_TRP bit in the CCR register ensures integer division by zero triggers a deterministic hardware exception instead of returning 0 silently.

V

volatile

Compiler Optimization Barrier for Hardware Access
📚 Modern C++ Mechanics & Idioms
C++ Keyword MMIO Registers Interrupts
Definition & Concept:

A type qualifier telling the compiler that a variable's value may change at any time through means outside the compiler's control (such as hardware peripherals or interrupt service routines).

⚡ Embedded Systems & Low-Level Reality

Prevents the compiler from caching register reads in CPU registers or optimizing away repeated writes. Mandatory for memory-mapped I/O (MMIO) and shared ISR flags.

VTable & VPtr

Virtual Method Table & Virtual Pointer
📚 Modern C++ Mechanics & Idioms
OOP Polymorphism VTable RAM Overhead
Definition & Concept:

The compiler mechanism for dynamic polymorphism: a VTable is an array of function pointers stored in Flash ROM (.rodata), and a VPtr is a hidden pointer stored inside every polymorphic object in SRAM pointing to its VTable.

⚡ Embedded Systems & Low-Level Reality

Adding a single virtual method adds 4 bytes of hidden SRAM overhead per object instance on a 32-bit MCU, and indirect branch calls through function pointers prevent compiler inlining and incur pipeline bubbles.

W

Watchdog Timer (WDT / IWDG)

Hardware Super-Loop Liveness Monitor
⚡ Embedded & CPU Architecture
Hardware Safety Reliability Reset Super-Loop
Definition & Concept:

An independent hardware countdown timer that automatically resets the microcontroller if the main firmware loop fails to refresh ('kick' / 'feed') it within a specified timeout window.

⚡ Embedded Systems & Low-Level Reality

Protects against firmware deadlocks, infinite loops, and hardware lockups in harsh EMI environments, ensuring automatic recovery in unattended systems.

Wear Leveling (Dynamic vs Static)

Flash Memory Erase-Cycle Distribution Algorithm
💾 Memory, Storage & Real-Time
Flash Memory Storage Endurance File System
Definition & Concept:

A technique used by embedded file systems (e.g. LittleFS) to distribute write and erase operations uniformly across all physical flash memory blocks.

⚡ Embedded Systems & Low-Level Reality

NOR and NAND Flash blocks degrade after 10,000 to 100,000 erase cycles. Dynamic wear leveling rotates active data writes, while static wear leveling also periodically relocates read-only static files to equalize wear, extending hardware lifespan from months to decades.

Z

Zero-Cost Abstraction

Bjarne Stroustrup's Guiding C++ Principle
📚 Modern C++ Mechanics & Idioms
C++ Philosophy Optimization Compilers Efficiency
Definition & Concept:

The foundational C++ principle stating: 'What you don't use, you don't pay for. What you do use, you couldn't hand code any better.'

⚡ Embedded Systems & Low-Level Reality

Modern C++ features such as templates, std::string_view, std::span, constexpr, and range-based for loops compile down to the exact same or more optimal assembly instructions as hand-written C pointer arithmetic.