Embedded

View Original

Creating Chaos and Hard Faults

Creating Chaos and Hard Faults Video Presentation

The best way to understand why the processor is sending you love letters (exceptions) is to see what they look like when you aren’t also frantically trying to fix your code. This talk goes over the code necessary to cause (and debug) divide by zero, bus errors, stack overflows, and buffer overflows.

For each one, Elecia looks at the information the Cortex-M processor provides and how to use that to determine the cause of the fault. She describes how to use the information in a hard fault handler to create small core dumps to be stored after a system reboot. 

This presentation is based on Chapter 9: Getting into Trouble, one of the new chapters in the second edition of Making Embedded Systems.

The slides are available in the Making Embedded Systems github repository.

The resources mentioned:

This talk was originally presented as a keynote at the Embedded Online Conference in 2024. All of the excellent talks are available there with paid registration.