cortex-m icon indicating copy to clipboard operation
cortex-m copied to clipboard

Enhancing the default handler

Open crawford opened this issue 6 years ago • 0 comments

I was looking into the default handler implementation and found some (seemingly) low-hanging fruit. I wanted to get your opinion before I made any changes though.

  1. I think the trampoline should test link register to determine if the exception frame is referenced in MSP or PSP. I've used this code in the past.
  2. I think the default_handler! macro should include the trampoline and call the specified function with the exception frame as the argument. This would allow me to define my own handler without having to reinvent the trampoline, but it would break backward compatibility.

crawford avatar Feb 16 '18 19:02 crawford