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-YI 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
Published at
2024-08-15 08:05:01 UTCEvent JSON
{
"id": "a8675fedb98bf45556550fc4cbedbf9ad65564506b21d4145818db5e0ac86b32",
"pubkey": "cd5bc3149a2a65e099dd3355281a7ccd9505fcf6e850729aac1aa79e649be44f",
"created_at": 1723709101,
"kind": 1,
"tags": [
[
"proxy",
"https://aus.social/@projectgus/112964999673694212",
"web"
],
[
"t",
"embedded"
],
[
"t",
"cpp"
],
[
"proxy",
"https://aus.social/users/projectgus/statuses/112964999673694212",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://aus.social/users/projectgus/statuses/112964999673694212",
"pink.momostr"
],
[
"-"
]
],
"content": "\"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\n\nI 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.\n\nOn 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.\n\n(Kind of similar to needing to analyse where Rust code might panic. I know there's some tooling for that, too.)\n\n#embedded #cpp",
"sig": "1ca3267854dd4b67c4fcf0a58424eaf1aa9bab49eaf7ef3718feffbb9e0d60a375defad1c8b85265f93008c0e7ca0b1e250c5345550ee27df64802c00133ef24"
}