Intermediate C++ developer focusing on C and embedded systems — learning bare-metal development with K&R, Jacob Sorber, and real hardware.
This is my personal learning repository documenting my journey through C and embedded systems development. I have an intermediate C++ background and am now focusing on mastering C and writing real firmware — understanding microcontrollers at the bare-metal level and building toward production-ready embedded projects.
- Variables, data types, operators
- Control flow (if, loops, switch)
- Printf format specifiers and float precision
- Character input, getchar(), EOF, and data type sizing
- If statements, character comparison, newline detection
- State machines, #define constants, word/line/character parsing
- Arrays, for loops, ASCII arithmetic, array initialization
- Functions, prototypes, return values, local scope
- Call by value, local copies, foundation for pointers
- Character arrays, strings, null terminator, get_line, copy
- External variables, global scope, extern keyword
- Pointers and memory
- Arrays and strings
- Pointers and memory
- Structs, enums, unions
- File I/O
- Bitwise operations
- Classes and objects
- RAII and resource management
- Templates (basics)
- What to avoid in embedded C++ (exceptions, dynamic allocation)
- GPIO
- Timers and interrupts
- UART / SPI / I2C communication
- ADC / DAC
- First project on STM32 Nucleo
- FreeRTOS basics (tasks, queues, semaphores)
- Memory-mapped I/O
- Linker scripts
- Bootloaders
- Sensor data logger
- Motor controller
- Custom bootloader
c-cpp-embedded-learning/
├── basics/ # C fundamentals — pointers, memory, bitwise
├── pointers/ # Deep dives into pointer mechanics
├── structs/ # Structs, enums, unions
├── files/ # File I/O
├── cpp/ # Embedded C++ examples
└── projects/ # Small complete programs
| Tool | Purpose |
|---|---|
| VS Code | Editor |
| PlatformIO | Embedded dev environment |
| Clang (Xcode CLI Tools) | C/C++ compiler |
| GDB + OpenOCD | Debugging |
| STM32 Nucleo | Target hardware (Phase 3+) |
macOS setup:
xcode-select --install # installs clangCompile and run a file:
clang filename.c -o filename && ./filenameBooks
- The C Programming Language — Kernighan & Ritchie (K&R)
YouTube
- Jacob Sorber — Best free embedded C content
- Low Level Learning — C internals and systems thinking
- Phil's Lab — STM32 and DSP
Websites
- cppreference.com — C/C++ language reference
- Interrupt Blog — Advanced embedded topics
- FreeRTOS.org — RTOS documentation
Courses
- Intro to Embedded Systems — Coursera (CU Boulder) — Free to audit
| Date | Milestone |
|---|---|
| 2026-03-17 | Repo created, Hello World running |
| 2026-03-17 | Temperature conversion table — K&R Chapter 1 (variables, while loop, printf format specifiers, integer division) |
| 2026-03-17 | Float temperature conversion — K&R Chapter 1 (float vs int, FPU awareness, printf width and precision specifiers) |
| 2026-03-18 | Character counter — K&R Chapter 1 (getchar, EOF, long vs int, byte-by-byte input reading) |
| 2026-03-19 | Line counter — K&R Chapter 1 (if statements, character comparison, char vs int, newline detection) |
| 2026-03-19 | Learned how Git commits and contributions work — committing files separately for granular history |
| 2026-03-23 | Word counter — K&R Chapter 1 (state machines, #define constants, multi-counter input parsing) |
| 2026-03-29 | Renamed repo to c-cpp-embedded-learning, added cpp/ folder, updated README to reflect C++ background |
| 2026-03-29 | Digit counter — K&R Chapter 1 (arrays, for loops, ASCII arithmetic, array initialization) |
| 2026-03-30 | Functions example — K&R Chapter 1 (function definitions, prototypes, return values, local scope) |
| 2026-03-30 | Call by value — K&R Chapter 1 (pass by value, local copies, foundation for pointers) |
| 2026-04-02 | Character arrays — K&R Chapter 1 (strings, null terminator, get_line, copy function) |
| 2026-04-02 | External variables — K&R Chapter 1 (global variables, scope, extern keyword) |
| 2026-04-02 | Completed K&R Chapter 1 |
Both are valid in modern C (C99 and later). This repo uses /* */ intentionally:
- Historical —
//was not part of the original C standard (C89/C90). Older embedded codebases and hardware vendor code use/* */exclusively. - Portability — some embedded toolchains target C89/C90 for maximum compiler compatibility. Older or stripped down compilers may not support
//at all. - Convention — FreeRTOS, STM32 HAL, MISRA C compliant code, and most vendor libraries all use
/* */style. Getting used to it now makes reading real embedded codebases feel natural later.
For modern projects targeting C99 or C11, // is perfectly fine.
- All code written and tested on macOS (Apple Silicon)
- Intermediate C++ background, focused on C and embedded fundamentals
- Goal: bare-metal embedded firmware development
Learning in public. Mistakes will be made. That's the point.