mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/esp32s2beta_crtbegin' into 'master'
esp32s2beta: fix crash at startup due to toolchain crtbegin being linked See merge request espressif/esp-idf!6783
This commit is contained in:
@@ -57,7 +57,7 @@ else()
|
|||||||
|
|
||||||
# Process the template file through the linker script generation mechanism, and use the output for linking the
|
# Process the template file through the linker script generation mechanism, and use the output for linking the
|
||||||
# final binary
|
# final binary
|
||||||
target_linker_script(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/ld/esp32s2beta.project.ld.in" PROCESS "${CMAKE_CURRENT_BINARY_DIR}/ld/esp32.project.ld")
|
target_linker_script(${COMPONENT_LIB} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/ld/esp32s2beta.project.ld.in" PROCESS "${CMAKE_CURRENT_BINARY_DIR}/ld/esp32s2beta.project.ld")
|
||||||
|
|
||||||
target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32s2beta.peripherals.ld")
|
target_linker_script(${COMPONENT_LIB} INTERFACE "ld/esp32s2beta.peripherals.ld")
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC gcc)
|
target_link_libraries(${COMPONENT_LIB} PUBLIC gcc)
|
||||||
|
@@ -267,12 +267,12 @@ SECTIONS
|
|||||||
__eh_frame = ABSOLUTE(.);
|
__eh_frame = ABSOLUTE(.);
|
||||||
KEEP(*(.eh_frame))
|
KEEP(*(.eh_frame))
|
||||||
. = (. + 7) & ~ 3;
|
. = (. + 7) & ~ 3;
|
||||||
/* C++ constructor and destructor tables, properly ordered: */
|
/* C++ constructor and destructor tables
|
||||||
|
|
||||||
|
Make a point of not including anything from crtbegin.o or crtend.o, as IDF doesn't use toolchain crt
|
||||||
|
*/
|
||||||
__init_array_start = ABSOLUTE(.);
|
__init_array_start = ABSOLUTE(.);
|
||||||
KEEP (*crtbegin.*(.ctors))
|
KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .ctors .ctors.*))
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
|
|
||||||
KEEP (*(SORT(.ctors.*)))
|
|
||||||
KEEP (*(.ctors))
|
|
||||||
__init_array_end = ABSOLUTE(.);
|
__init_array_end = ABSOLUTE(.);
|
||||||
KEEP (*crtbegin.*(.dtors))
|
KEEP (*crtbegin.*(.dtors))
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
|
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
|
||||||
|
@@ -408,7 +408,6 @@ void xt_unhandled_exception(XtExcFrame *frame)
|
|||||||
panicPutStr("Unknown");
|
panicPutStr("Unknown");
|
||||||
}
|
}
|
||||||
panicPutStr(")");
|
panicPutStr(")");
|
||||||
#ifdef PANIC_COMPLETE_IN_ESP32C
|
|
||||||
if (esp_cpu_in_ocd_debug_mode()) {
|
if (esp_cpu_in_ocd_debug_mode()) {
|
||||||
panicPutStr(" at pc=");
|
panicPutStr(" at pc=");
|
||||||
panicPutHex(frame->pc);
|
panicPutHex(frame->pc);
|
||||||
@@ -426,7 +425,6 @@ void xt_unhandled_exception(XtExcFrame *frame)
|
|||||||
setFirstBreakpoint(frame->pc);
|
setFirstBreakpoint(frame->pc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
panicPutStr(". Exception was unhandled.\r\n");
|
panicPutStr(". Exception was unhandled.\r\n");
|
||||||
}
|
}
|
||||||
commonErrorHandler(frame);
|
commonErrorHandler(frame);
|
||||||
|
Reference in New Issue
Block a user