File tree Expand file tree Collapse file tree 5 files changed +9
-6
lines changed
platform/source/TARGET_CORTEX_M Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ Fault_Handler_Continue2
150
150
MRS R2 , CONTROL ; Get CONTROL Reg
151
151
STR R2 ,[ R1 ]
152
152
MOV R0 , R12
153
- LDR R1 , =mbed_fault_context
153
+ LDR R3 , =mbed_fault_context
154
+ LDR R1 ,[ R3 ]
154
155
BL mbed_fault_handler
155
156
#endif
156
157
B . ; Just in case we come back here
Original file line number Diff line number Diff line change @@ -183,7 +183,8 @@ Fault_Handler_Continue2:
183
183
MRS R2 , CONTROL // Get CONTROL Reg
184
184
STR R2 ,[ R1 ]
185
185
MOV R0 , R12
186
- LDR R1 , =mbed_fault_context
186
+ LDR R3 , =mbed_fault_context
187
+ LDR R1 ,[ R3 ]
187
188
BL mbed_fault_handler
188
189
#endif
189
190
B . // Just in case we come back here
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ Fault_Handler_Continue2
145
145
MRS R2 , CONTROL ; Get CONTROL Reg
146
146
STR R2 ,[ R1 ]
147
147
MOV R0 , R12
148
- LDR R1 , =mbed_fault_context
148
+ LDR R3 , =mbed_fault_context
149
+ LDR R1 ,[ R3 ]
149
150
BL mbed_fault_handler
150
151
#endif
151
152
B . ; Just in case we come back here
Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ void print_context_info(void);
36
36
mbed_fault_context_t * const mbed_fault_context = (mbed_fault_context_t * )(FAULT_CONTEXT_LOCATION );
37
37
#else
38
38
mbed_fault_context_t fault_context ;
39
- mbed_fault_context_t * const mbed_fault_context = ( mbed_fault_context_t * ) & fault_context ;
39
+ mbed_fault_context_t * const mbed_fault_context = & fault_context ;
40
40
#endif
41
41
42
42
//This is a handler function called from Fault handler to print the error information out.
43
43
//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.
44
- void mbed_fault_handler (uint32_t fault_type , void * mbed_fault_context_in )
44
+ void mbed_fault_handler (uint32_t fault_type , const mbed_fault_context_t * mbed_fault_context_in )
45
45
{
46
46
mbed_error_status_t faultStatus = MBED_SUCCESS ;
47
47
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ typedef struct {
57
57
58
58
//This is a handler function called from Fault handler to print the error information out.
59
59
//This runs in fault context and uses special functions(defined in mbed_fault_handler.c) to print the information without using C-lib support.
60
- void mbed_fault_handler (uint32_t fault_type , void * mbed_fault_context_in );
60
+ void mbed_fault_handler (uint32_t fault_type , const mbed_fault_context_t * mbed_fault_context_in );
61
61
62
62
/**
63
63
* 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.
You can’t perform that action at this time.
0 commit comments