X-Git-Url: https://git.sur5r.net/?p=freertos;a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FThirdParty%2FGCC%2FXtensa_ESP32%2Fxtensa_vectors.S;fp=FreeRTOS%2FSource%2Fportable%2FThirdParty%2FGCC%2FXtensa_ESP32%2Fxtensa_vectors.S;h=5c8601d1c7e086ba89acb44861c43c7bb7096f63;hp=4ae14d5c65049221cba76ec361ecc8b237a2e7c7;hb=53b6a1d8973d8e067ef9561154aad789b91c936a;hpb=dddefe062e4e56e864b269fcb4779e831ae98fe2 diff --git a/FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S b/FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S index 4ae14d5c6..5c8601d1c 100644 --- a/FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S +++ b/FreeRTOS/Source/portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_vectors.S @@ -581,6 +581,11 @@ _UserExceptionVector: -------------------------------------------------------------------------------- */ +#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY + .global LoadStoreErrorHandler + .global AlignmentErrorHandler +#endif + .section .iram1,"ax" #if XCHAL_HAVE_WINDOWED @@ -602,6 +607,20 @@ _xt_to_coproc_exc: /* never returns here - call0 is used as a jump (see note at top) */ #endif +#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY + .align 4 +_call_loadstore_handler: + call0 LoadStoreErrorHandler + /* This will return only if wrong opcode or address out of range*/ + j .LS_exit + + .align 4 +_call_alignment_handler: + call0 AlignmentErrorHandler + /* This will return only if wrong opcode or address out of range*/ + addi a0, a0, 1 + j .LS_exit +#endif /* -------------------------------------------------------------------------------- @@ -631,6 +650,15 @@ _xt_user_exc: #endif beqi a0, EXCCAUSE_SYSCALL, _xt_to_syscall_exc +#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY + beqi a0, EXCCAUSE_LOAD_STORE_ERROR, _call_loadstore_handler + + addi a0, a0, -1 + beqi a0, 8, _call_alignment_handler + addi a0, a0, 1 +.LS_exit: +#endif + /* Handle all other exceptions. All can have user-defined handlers. */ /* NOTE: we'll stay on the user stack for exception handling. */