Skip to content

Commit bdfef3f

Browse files
committed
Removed #warning of non-Cortex-M. Minor comment adjustment.
1 parent 1841563 commit bdfef3f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

platform/source/mbed_error.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,9 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
160160
#if defined(__CORTEX_M)
161161
mbed_fault_context_t *mfc = (mbed_fault_context_t *)error_value;
162162
current_error_ctx.error_address = (uint32_t)mfc->PC_reg;
163+
// Note that this SP_reg is the correct SP value of the fault. PSP and MSP are slightly different due to HardFault_Handler.
163164
current_error_ctx.thread_current_sp = (uint32_t)mfc->SP_reg;
164-
// Note that the RTX thread itself is same even under fault exception handlers.
165-
#else
166-
#warning Please implement non Cortex-M handler for those error cases.
165+
// Note that the RTX thread itself is the same even under this fault exception handler.
167166
#endif
168167
} else {
169168
current_error_ctx.error_address = (uint32_t)caller;

0 commit comments

Comments
 (0)