Skip to content
0:00 / 0:00

#c++exceptions#embedded#firmware

C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024

CppCon

189K subscribers • 94 videos on Hallway • Conference channel

YouTube
  • Recommended by 7 people: 5 on Hacker News, 1 in engineering communities and 1 curated list.
  • Presented by Khalil Estell
  • Linked in the descriptionCppCon/CppCon2024

Advanced. Deep dive for people who know the field.

23K views1 year ago7 recommendations

Systems programmingProgramming languagesC++Embedded systemsPerformance and optimization

Khalil Estell explains how C++ exceptions work under the hood and how to optimize them to reduce binary size in embedded systems.

cppcon.org CppCon 2024 Early Access: cppcon.org/early-access Access All 2024 Session Videos Ahead of Their Official Release To YouTube. At least 30 days exclusive access through the Early Access system. Videos will be released to the CppCon channel on a schedule of one video per business day, with initial releases starting in November. --- C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024 --- For years, developers have overlooked a powerful tool for reducing binary size: C++ exceptions. Join me on a deep dive into the world of exceptions and discover how they can be harnessed to create more space efficient firmware. We’ll explore the requirements and best practices of embedded development, and show what is required to use exceptions in that environment. By the end of this talk, you’ll have a thorough understanding of how exceptions are handled, what their space costs are, and how exceptions compare to functional errors as values. --- Slides: github.com/CppCon/CppCon2024/blob/main/Presentations/Cpp_Exc… Work at Hudson River Trading (HRT): tinyurl.com/safxfctf --- Khalil Estell Khalil is a ISO C++ Committee Member and has extensive experience writing production firmware. --- CppCon is the annual, week-long, face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts. Annual CppCon Conference - cppcon.org linkedin.com/company/cppcon x.com/cppcon facebook.com/CppConference reddit.com/r/cppcon/ mastodon.social/@CppCon --- Videos Filmed & Edited by Bash Films: BashFilms.com YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk --- #exceptionhandling #firmware #firmwareupdate #cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #technology #programming

Why it's here

7 people recommend this

What people say. Recommended as a deep dive into C++ exception mechanics and how to reduce their code footprint on embedded platforms.

u/Orca-in r/embedded • Recommends

C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024

inetknghton Hacker News • Recommends

On “How is Ultrassembler so fast?”

> I don't have enough time to watch these kinds of presentations. Then let me pick and share some of my favorites that I found enlightening, and summarize with some information that I found useful. By far, the most useful one is Khalil Estell's presentation last year 0. It's a fairly face paced but relatively deep dive into exception mechanics. At the end, he advocates for a new tool that would audit a program to determine what exceptions could be thrown. I think that's a flipping fantastic idea for a tool. Unfortunately I haven't seen any progress toward it -- if someone here knows where his tool is, or a similar tool, please reply! I did send him an email a few months ago inquiring about…

programming-talkscurated list on GitHubRecommends

Under “C++”

C++ Exceptions for Smaller Firmware 01:24:35 by **Khalil Estell** (2024)

bluGillon Hacker News • Recommends

On “Software development topics I've changed my mind on”

Khalil Estell has some great work on that. link to this video is one link - very low level technical of what is really happening. He has other talks and papers if you search his name.

mpyneon Hacker News • Recommends

On “How is Ultrassembler so fast?”

A specific presentation I'd point to is Khalil Estell's presentation on reducing exception code size on embedded platforms at link to this video But honestly you'd get vast majority of the benefit just by skimming through the slides at link With a couple of symbols you define yourself a lot of the associated g++ code size is sharply reduced while still allowing exceptions to work. (Slide 60 on)

neonz80on Hacker News • Recommends

On “Async/Await is finally back in Zig”

There was an interesting talk about C++ exceptions in smaller firmware at CppCon last year: link to this video Basically, the overhead of exceptions is probably less than handling the same errors manually in any non-trivial program. Also, it's not like these table doesn't exist in other languages. Both Rust and Go have to unwind.

daeminon Hacker News • Recommends

On “Practical Guide to Bare Metal C++”

I just thought I'd mention that Khalil Estell is doing some work regarding exceptions in embedded and bare metal programming. In the first of his talks about this topic ( link to this video ) he mentions that a lot of the bloat in exception handling is including printf in order to print out the message when terminating the program. For those interested he has another presentation on this topic link

inetknghton Hacker News • Mentions

On “How is Ultrassembler so fast?”

Update: it looks like link 4 is just a rehash of his talk from last year's cppcon 0. 0: link to this video 4: link

vodouon Hacker News • Mentions

On “The C++ standard for the F-35 Fighter Jet [video]”

Need to check it out. I guess you mean these: - C++ Exceptions Reduce Firmware Code Size, ACCU 1 - C++ Exceptions for Smaller Firmware, CppCon 2 1: link 2: link to this video

u/tartaruga232in r/ProgrammingLanguages • Mentions

On “Sric: A new systems language that makes C++ memory safe”

If used correctly in C++, there are no resource leaks possibile. Also exceptions do reduce resources used as demonstrated here: link to this video