mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11272 from andrewc-arm/pr_mbed_fault_context01
mbed fault handler: fix mbed_fault_context parameterpull/11307/head
commit
2c3ce9629e
|
@ -150,7 +150,8 @@ Fault_Handler_Continue2
|
|||
MRS R2,CONTROL ; Get CONTROL Reg
|
||||
STR R2,[R1]
|
||||
MOV R0,R12
|
||||
LDR R1,=mbed_fault_context
|
||||
LDR R3,=mbed_fault_context
|
||||
LDR R1,[R3]
|
||||
BL mbed_fault_handler
|
||||
#endif
|
||||
B . ; Just in case we come back here
|
||||
|
|
|
@ -183,7 +183,8 @@ Fault_Handler_Continue2:
|
|||
MRS R2,CONTROL // Get CONTROL Reg
|
||||
STR R2,[R1]
|
||||
MOV R0,R12
|
||||
LDR R1,=mbed_fault_context
|
||||
LDR R3,=mbed_fault_context
|
||||
LDR R1,[R3]
|
||||
BL mbed_fault_handler
|
||||
#endif
|
||||
B . // Just in case we come back here
|
||||
|
|
|
@ -145,7 +145,8 @@ Fault_Handler_Continue2
|
|||
MRS R2,CONTROL ; Get CONTROL Reg
|
||||
STR R2,[R1]
|
||||
MOV R0,R12
|
||||
LDR R1,=mbed_fault_context
|
||||
LDR R3,=mbed_fault_context
|
||||
LDR R1,[R3]
|
||||
BL mbed_fault_handler
|
||||
#endif
|
||||
B . ; Just in case we come back here
|
||||
|
|
|
@ -36,12 +36,12 @@ void print_context_info(void);
|
|||
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *)(FAULT_CONTEXT_LOCATION);
|
||||
#else
|
||||
mbed_fault_context_t fault_context;
|
||||
mbed_fault_context_t *const mbed_fault_context = (mbed_fault_context_t *) &fault_context;
|
||||
mbed_fault_context_t *const mbed_fault_context = &fault_context;
|
||||
#endif
|
||||
|
||||
//This is a handler function called from Fault handler to print the error information out.
|
||||
//This runs in fault context and uses special functions(defined in mbed_rtx_fault_handler.c) to print the information without using C-lib support.
|
||||
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in)
|
||||
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in)
|
||||
{
|
||||
mbed_error_status_t faultStatus = MBED_SUCCESS;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct {
|
|||
|
||||
//This is a handler function called from Fault handler to print the error information out.
|
||||
//This runs in fault context and uses special functions(defined in mbed_fault_handler.c) to print the information without using C-lib support.
|
||||
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in);
|
||||
void mbed_fault_handler(uint32_t fault_type, const mbed_fault_context_t *mbed_fault_context_in);
|
||||
|
||||
/**
|
||||
* Call this function to retrieve the fault context after a fatal exception which triggered a system reboot. The function retrieves the fault context stored in crash-report ram area which is preserved over reboot.
|
||||
|
|
Loading…
Reference in New Issue