u/danngreenin r/embedded • Recommends
On “Advice on using C++ in low level embedded”
You probably want to read this book:
https://arobenko.github.io/bare_metal_cpp/
It gets very low-level, to the point of startup code (crt.0) and compiling with -nostdlib. It also talks about how to detect with 100% confidence if something is using dynamic allocations, answering one of your questions.
Regarding what parts of the std lib are OK to use, there’s a lot of overlap between low-level embedded and real-time programming (no allocations, no rtti, no exceptions). This talk isn’t exactly what you’re looking for but has some good tips regarding what parts of the std lib are ok:
link to this video