~/talk

C++ Exceptions Reduce Firmware Code Size

Talkat ACCU 2024 · 2024-04-17..04-20· [embedded-and-hardware]
links:none on file
slides:none on file

Claim: using C++ exceptions can produce smaller and faster firmware than pervasive result types. Rebuilds the ARM GNU Toolchain for Cortex M4, implements a bare‑metal exception runtime (overrides terminate, supplies cxa_allocate_exception, tweaks RTTI), and measures binaries: initial throw adds ~150 KB, removing iostream/terminate cuts it to ~13 KB (≈91% reduction). Finds libunwind ≈8 KB and a crossover near ~580 checked calls where exceptions beat std::expected, and reports faster throw/unwind than stock libunwind.

AI-written summary · about

  1. 0:00Introduction
  2. 13:41Avoiding exceptions in embedded
  3. 21:10Migrating to exceptions
  4. 35:57How exceptions work
  5. 57:01Exception metadata and size
  6. 1:19:59Performance and optimizations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.