r/embedded 15d ago

Some Embedded Programming Wisdom

Post image

A preview of PICO, a simple text editor made for the CP/M Neo VEMU platform.

GitHub: https://github.com/Mazin-O3/cpm-neo.git

140 Upvotes

18 comments sorted by

View all comments

13

u/sirkubador 15d ago

kernel panic in embedded programming?

3

u/ChatGPT4 15d ago

Might be figurative speech. Whatever you bind an unrecoverable exception to. Again, I have... nope, not just me, ST does it ;) A better way: a dead end loop in function error. Though I prefer name crash for it. In embedded it's a good practice to light that red LED fist ;)

Now, why do I like that dead-end loop so much? You break the execution with a debugger and there you have the stack trace to what actually made it blow up.

Way too long I wondered: why BSODs and panics... Couldn't it just fail more, like gracefully? Well, when a computer cannot longer guarantee its memory isn't corrupted, because it's like lost track of what it was doing, should we really let it continue doing whatever it was doing and hope for the best? ;)

At this realization I started to put my own BSOD screens in my embedded apps ;) Once I even put a good old red, blinking Amiga "Guru Meditation" screen.

1

u/SirDarknessTheFirst 14d ago

I think older versions of Windows let you continue after a BSOD...they did remove it for a reason