Gus on Nostr: "C++ Exceptions Reduce Firmware Code Size" talk by Khalil Estell is worth the time, ...
"C++ Exceptions Reduce Firmware Code Size" talk by Khalil Estell is worth the time, explains in detail gcc's exception mechanism on ARM Cortex-M and challenged a few of my long held assumptions. https://www.youtube.com/watch?v=BGmzMuSDt-Y
I still think the trickiest aspect of exceptions in C++ is not knowing what could throw what, because it's not in the function signature. Although the function-colouring side effect of declared exceptions (i.e. Java) brings its own problems.
On that, I reckon the most interesting idea was mentioned briefly at the end: a post-build analysis tool that tells you where your firmware might terminate due to uncaught exceptions. A tool like that could make exceptions much more ergonomic.
(Kind of similar to needing to analyse where Rust code might panic. I know there's some tooling for that, too.)
#embedded #cpp
I still think the trickiest aspect of exceptions in C++ is not knowing what could throw what, because it's not in the function signature. Although the function-colouring side effect of declared exceptions (i.e. Java) brings its own problems.
On that, I reckon the most interesting idea was mentioned briefly at the end: a post-build analysis tool that tells you where your firmware might terminate due to uncaught exceptions. A tool like that could make exceptions much more ergonomic.
(Kind of similar to needing to analyse where Rust code might panic. I know there's some tooling for that, too.)
#embedded #cpp