diff --git a/components/esp_common/CMakeLists.txt b/components/esp_common/CMakeLists.txt index 1edabc4ea6..0baf70ec1f 100644 --- a/components/esp_common/CMakeLists.txt +++ b/components/esp_common/CMakeLists.txt @@ -9,15 +9,13 @@ if(BOOTLOADER_BUILD) set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections") else() # Regular app build - list(APPEND srcs "src/esp_err.c" - "src/esp_err_to_name.c") + list(APPEND srcs "src/esp_err_to_name.c") # Note: esp_ipc, esp_pm added as a public requirement to keep compatibility as to be located here. idf_component_register(SRCS "${srcs}" INCLUDE_DIRS include REQUIRES ${target} espcoredump esp_timer esp_ipc esp_pm esp_hw_support - PRIV_REQUIRES soc - LDFRAGMENTS "linker.lf") + PRIV_REQUIRES soc) set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections") set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections") diff --git a/components/esp_common/linker.lf b/components/esp_common/linker.lf deleted file mode 100644 index b6913ecff1..0000000000 --- a/components/esp_common/linker.lf +++ /dev/null @@ -1,4 +0,0 @@ -[mapping:esp_common] -archive: libesp_common.a -entries: - esp_err (noflash) diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 2b5ea50442..4dc3224bdb 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -16,7 +16,8 @@ set(srcs "intr_alloc.c" "task_wdt.c" "int_wdt.c" "stack_check.c" - "freertos_hooks.c") + "freertos_hooks.c" + "esp_err.c") if(NOT (${target} STREQUAL "esp32c3") ) list(APPEND srcs "dbg_stubs.c") diff --git a/components/esp_common/src/esp_err.c b/components/esp_system/esp_err.c similarity index 98% rename from components/esp_common/src/esp_err.c rename to components/esp_system/esp_err.c index 4aa6a230d0..9df59f9290 100644 --- a/components/esp_common/src/esp_err.c +++ b/components/esp_system/esp_err.c @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include +#include #include #include "esp_err.h" diff --git a/components/esp_system/linker.lf b/components/esp_system/linker.lf index 00544ff0df..b8c568f0e3 100644 --- a/components/esp_system/linker.lf +++ b/components/esp_system/linker.lf @@ -5,6 +5,7 @@ entries: panic_handler (noflash) panic_arch (noflash) reset_reason (noflash) + esp_err (noflash) system_api:esp_system_abort (noflash) if ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF: