Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Embedded Systems Engineering Curriculum
·
Module 2
Data Representation and Low-Level Manipulation
1
Storage Classes in Multi-File Projects
Apply storage classes (static, extern, register) with correct linkage and lifetime semantics in multi-file projects.
2
Mastering Volatile: ISRs, Memory-Mapped I/O, and Optimization Barriers
Apply `volatile` correctly for ISR-shared variables, memory-mapped I/O, and as a compiler optimization barrier.
3
Mastering `const` Pointers & Read-Only Hardware
Enforce `const` correctness with const pointers, pointers-to-const, and `const volatile` for read-only hardware registers.
4
Optimizing Struct Memory Layout
Calculate structure size and padding manually, and rearrange struct members to minimize memory footprint.
5
Data Alignment: `#pragma pack` and `__attribute__((packed))`
Apply `#pragma pack` and `__attribute__((packed))` to control data alignment and explain the performance trade-offs.
6
Offsetof and Container_of for Intrusive Data Structures
Implement the `offsetof` macro and use it within the `container_of` pattern to work with intrusive data structures.
7
Endianness Detection and Byte Order Conversion
Write code to detect system endianness at runtime and perform conversions between little-endian, big-endian, and network byte order.
8
Register Manipulation Macros
Develop a set of type-safe, efficient macros for hardware register manipulation (read, write, set, clear bits/fields).
Previous module
Advanced C: Pointers, Memory, and Aliasing
Next module
The Build Process and Program Execution