MISRA C Rules – Safe Coding Guidelines for Embedded and Automotive C
–
–
Memory-mapped I/O in C is how embedded software controls hardware. Instead of using special CPU instructions to access devices, the processor maps hardware control registers to ordinary memory addresses. A C pointer dereferenced at that address reads or writes the hardware directly — toggling an LED, configuring a timer, or sending a byte over UART …
Function pointers in C hold the address of a function and allow calling it indirectly — through the pointer rather than by name. This enables callbacks, dispatch tables, plugin architectures, and strategy patterns that are otherwise impossible in C without conditional branches. Every event-driven framework, interrupt vector table, and generic algorithm in embedded and systems …
The volatile keyword in C tells the compiler that a variable’s value can change at any time — from outside the normal flow of the program — and therefore every read and write must go directly to memory, never to a cached register copy. Without it, the C compiler is free to optimise away reads …
Bit manipulation in C means reading, setting, clearing, and toggling individual bits within an integer. At the hardware level, everything from GPIO port states to network protocol flags to image pixel data is ultimately a pattern of bits. Knowing how to work with them efficiently — using only bitwise operators with no branches — is …
Setting up to write C can feel confusing when you are starting out — compiler, editor, terminal, IDE, online tools… where do you even begin? This guide pulls everything together into one clear path. Follow it in order, or jump to the step you need. Every link goes to a detailed, step-by-step guide. By the …