Debug tool and helpers.
More...
#include "sarmfsw.h"
Debug tool and helpers.
- Author
- SMFSW
- Copyright
- MIT (c) 2017-2024, SMFSW
◆ exception_Handler
#define exception_Handler |
( |
| e | ) |
|
Value: __ASM ( "tst lr, #4 \r\n" \
"ite EQ \r\n" \
"mrseq r0, MSP \r\n" \
"mrsne r0, PSP \r\n" \
"b " #e "_Handler_callback \r\n");
Exception handler asm caller.
- Note
- The exception_Handler should be called with corresponding exception name e as parameter
◆ Error_Handler_callback()
void Error_Handler_callback |
( |
const uint32_t | stack[] | ) |
|
prints informations about current Hard Fault exception
- Parameters
-
[in] | stack | - pointer to stack address |
- Note
- HardFault_Handler_callback should not be called directly use exception_Handler() which prepares pointer to current stack instead
- Warning
- Depending how arm is fucked up, informations may not be printed, at least, you could inspect exception and stack through debug breakpoint
- Note
- Never returns (anyways, arm fubared!)
◆ Get_Reset_Source()
eResetSource Get_Reset_Source |
( |
void | | ) |
|
Get the last source of reset.
- Warning
- This function should be called soon after reset (before or after SystemClock_Config())
- Note
- This function using some special macros can't be inlined, thus can't be in sarmfsw stm32 header unfortunately
- Returns
- Last Reset Source
◆ HardFault_Handler_callback()
void HardFault_Handler_callback |
( |
const uint32_t | stack[] | ) |
|
prints informations about current Hard Fault exception
- Parameters
-
[in] | stack | - pointer to stack address |
- Note
- HardFault_Handler_callback should not be called directly use exception_Handler() which prepares pointer to current stack instead
- Warning
- Depending how arm is fucked up, informations may not be printed, at least, you could inspect exception and stack through debug breakpoint
- Note
- Never returns (anyways, arm fubared!)