News for hackers. Stuff that matters.
Re:Practical Guide to Bare Metal C++ by astrobe_ on Friday June 02, 2017 @02:51PM (#14472412)
I didn't read the book but if you're "bare metal" you want to avoid dynamic allocations in the place. Secondly, if you really run out of memory then you've screwed up something really badly and yes, in these situations your best option is to let the watchdog eat your poor carcass.
Re:Practical Guide to Bare Metal C++ by Gibbon1 on Friday June 02, 2017 @04:12PM (#14472939)
What you really want to do in these cases is log debugging info to a noinit section of memory or nonvolatile memory and then reset the processor. Then the firmware can check for and report any logged errors on startup. If you do this religiously you might make it to fifty with most of your hair.
Re:Practical Guide to Bare Metal C++ by monocasa on Friday June 02, 2017 @04:17PM (#14472973)
Also, for those programmers who have some input on the EE's designs, a stuff option for MRAM is amazing. It's essentially equivalent to battery backed SRAM, but one chip. We stick logs and hardware exception stack traces/register dumps in there on dev units.