Course
Debugging & Toolchain
The compiler/linker/loader toolchain, makefiles and linker scripts, GDB and on-chip debugging (JTAG/SWD), breakpoints, logic analyzers, logging, and reading a datasheet.
3h 20m total9 lessonsBeginner friendly
Get started
Enroll to track your progress and unlock the lesson shell.
- Progress tracked per lesson
- Course shows up in your dashboard
- Bookmarks, notes & more (coming soon)
Lesson Content
0/9 done- 11The ToolchainThe chain of programs that turns source into a flashable image (compiler, assembler, linker, loader), plus cross-compilation (arm-none-eabi-*) and objcopy from ELF to .bin/.hex.20 min
- 22The Build Process & MakefilesAutomating compile-and-link and rebuilding only what changed: Make rules (target/prereq/recipe), pattern rules and variables, and auto-generated header dependencies that avoid stale builds.22 min
- 33Linker Scripts & Memory SectionsTelling the linker the chip's memory map: MEMORY and SECTIONS place .text in flash and .data/.bss in RAM, and the VMA-vs-LMA split is why startup code must copy initialized data.24 min
- 44Debugging with GDBPause, inspect, and step through a running program: GDB's core commands (break/continue/step, print, backtrace), connecting to an embedded target over a gdbserver, and the optimization gotcha.24 min
- 55On-Chip Debugging: JTAG & SWDHow GDB physically reaches into a running chip: built-in debug logic accessed via JTAG (4-5 pins) or ARM's 2-pin SWD, through a debug probe, enabling halt/run, memory access, flashing, and trace.22 min
- 66Breakpoints & WatchpointsStop on a line vs stop on a data change: software vs hardware breakpoints (and why flash execution forces the limited hardware kind), and watchpoints, the tool for catching memory corruption.22 min
- 77Logic Analyzer & OscilloscopeSeeing the actual signals: a scope shows analog shape (edges, noise, ringing) on a few channels; a logic analyzer shows digital levels on many channels and decodes protocols, plus triggering and the GPIO-toggle trick.22 min
- 88printf Debugging & LoggingWhere does printf go on a chip with no console, and what does it cost? Retargeting output to UART/SWO/RTT (vs slow halting semihosting), intrusiveness, and leveled, deferred, compile-gated logging.22 min
- 99Reading a DatasheetThe meta-skill behind every register and pin you've used: navigating a datasheet/reference manual, absolute-max vs recommended ratings, designing to worst-case min/max, reading timing diagrams, and checking errata.22 min
Stay consistent, achieve mastery!
Complete more lessons to level up your skills.