diff options
author | Diego Ismirlian <dismirlian@gmail.com> | 2019-10-02 15:14:28 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian@gmail.com> | 2019-10-02 15:14:28 -0300 |
commit | 41f2f8462a2dc71c8194703fb879e6a667fb723b (patch) | |
tree | 307d1ab1be365128869d6ff025bd4355c4fc0c21 /os/various | |
parent | 2cd41f99df0fc857afaef091ca3b984a728d0e3c (diff) | |
download | ChibiOS-Contrib-41f2f8462a2dc71c8194703fb879e6a667fb723b.tar.gz ChibiOS-Contrib-41f2f8462a2dc71c8194703fb879e6a667fb723b.tar.bz2 ChibiOS-Contrib-41f2f8462a2dc71c8194703fb879e6a667fb723b.zip |
Add fault handlers to ease ARM-v7m (Cortex M3/M4(F)/M7 debugging
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/fault_handlers/fault_handlers.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/os/various/fault_handlers/fault_handlers.h b/os/various/fault_handlers/fault_handlers.h new file mode 100644 index 0000000..1fb210b --- /dev/null +++ b/os/various/fault_handlers/fault_handlers.h @@ -0,0 +1,22 @@ +#ifndef FAULT_HANDLERS_H_ +#define FAULT_HANDLERS_H_ + +#include <ch.h> +#include "port_fault_handlers.h" + +/* + * Notes: + * + * 1) #define FAULT_NO_PRINT to remove chprintf, etc + * 2) #define FAULT_INFO_HOOK(fault_info) to receive a struct fault_info when + * a fault is produced. + */ + +struct fault_info { + struct decoded_fault_registers decoded_fault_registers; +#ifndef FAULT_NO_PRINT + char decoded_info_string[300]; +#endif +}; + +#endif /* FAULT_HANDLERS_H_ */ |