Learn Effective C++ for Embedded Code
luckyresistor.me
Learn Effective C++ for Embedded Code
1–10 of 21 posts
Re: Learn Effective C++ for Embedded Code
#2Re: Learn Effective C++ for Embedded Code
#3Re: Learn Effective C++ for Embedded Code
#4I'm a big fan of quantum leaps (www.state-machine.com) for c++ embedded. I am not affiliated with them in any way, just had a great experience with it.
Re: Learn Effective C++ for Embedded Code
#5The Embedded Template Library seems relevant here: https://www.etlcpp.com/
Re: Learn Effective C++ for Embedded Code
#6I get templates, classes, and constexpr might be incredibly valuable though. If used within reason to avoid code size issues.
Has anyone spent serious time writing large firmwares in c++ with teams? What’s debugging like? How do people agree on what subset of the language and it’s plethora of features to use?
Re: Learn Effective C++ for Embedded Code
#7I’m always under the impression that C++ has some issues when it comes to embedded and that only a subset can be used, that the stdlib and stl cannot be used. I still don’t really understand how c++ behaves with exception handling thrown in the mix, where all sort of weird gotchas seemingly come into play. I get templates, classes, and constexpr might be incredibly valuable though. If used within reason to avoid code…
In my experience you normally disable exceptions when working on embedded code. No RTTI either.
> What’s debugging like?
What's with debugging? Not different to C at all.
> How do people agree on what subset of the language and it’s plethora of features to use?
You agree on the language standard to use, you don't pull dependencies arbitrarily and you keep an eye on the code size and memory usage. Some things might go into project style guide which is a nice thing to have anyway.
Re: Learn Effective C++ for Embedded Code
#8I’m always under the impression that C++ has some issues when it comes to embedded and that only a subset can be used, that the stdlib and stl cannot be used. I still don’t really understand how c++ behaves with exception handling thrown in the mix, where all sort of weird gotchas seemingly come into play. I get templates, classes, and constexpr might be incredibly valuable though. If used within reason to avoid code…
I'm having some fun with RP2040s and ESP32s these days and I can just use standard C++20 as understood by GCC 12 without specific restrictions except exceptions (and I'm having a lot of fun with it) - hell, there's even some boost:: usage in there.
Re: Learn Effective C++ for Embedded Code
#9Re: Learn Effective C++ for Embedded Code
#10I’m always under the impression that C++ has some issues when it comes to embedded and that only a subset can be used, that the stdlib and stl cannot be used. I still don’t really understand how c++ behaves with exception handling thrown in the mix, where all sort of weird gotchas seemingly come into play. I get templates, classes, and constexpr might be incredibly valuable though. If used within reason to avoid code…