mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/move_espcordump_init_into_component' into 'master'
feat(coredump): move esp_core_dump_init into component Closes IDF-8766 See merge request espressif/esp-idf!28665
This commit is contained in:
commit
4c6f3fbf23
@ -41,10 +41,6 @@
|
||||
#include "esp_app_desc.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_COREDUMP_ENABLE
|
||||
#include "esp_core_dump.h"
|
||||
#endif
|
||||
|
||||
#if CONFIG_PM_ENABLE
|
||||
#include "esp_pm.h"
|
||||
#include "esp_private/pm_impl.h"
|
||||
@ -279,14 +275,6 @@ ESP_SYSTEM_INIT_FN(init_pm, SECONDARY, BIT(0), 201)
|
||||
}
|
||||
#endif // CONFIG_PM_ENABLE
|
||||
|
||||
#if CONFIG_ESP_COREDUMP_ENABLE
|
||||
ESP_SYSTEM_INIT_FN(init_coredump, SECONDARY, BIT(0), 202)
|
||||
{
|
||||
esp_core_dump_init();
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif // CONFIG_ESP_COREDUMP_ENABLE
|
||||
|
||||
#if SOC_APB_BACKUP_DMA
|
||||
ESP_SYSTEM_INIT_FN(init_apb_dma, SECONDARY, BIT(0), 203)
|
||||
{
|
||||
|
@ -75,13 +75,15 @@ SECONDARY: 107: sleep_sys_periph_startup_init in components/esp_hw_support/sleep
|
||||
SECONDARY: 115: esp_apptrace_init in components/app_trace/app_trace.c on ESP_SYSTEM_INIT_ALL_CORES
|
||||
SECONDARY: 120: sysview_init in components/app_trace/sys_view/esp/SEGGER_RTT_esp.c on BIT(0)
|
||||
|
||||
# coredump doesn't have init dependencies
|
||||
SECONDARY: 130: init_coredump in components/espcoredump/src/core_dump_init.c on BIT(0)
|
||||
|
||||
# esp_debug_stubs doesn't have init dependencies
|
||||
SECONDARY: 140: init_dbg_stubs in components/app_trace/debug_stubs.c on BIT(0)
|
||||
|
||||
# the rest of the components which are initialized from startup_funcs.c
|
||||
# [refactor-todo]: move init calls into respective components
|
||||
SECONDARY: 201: init_pm in components/esp_system/startup_funcs.c on BIT(0)
|
||||
SECONDARY: 202: init_coredump in components/esp_system/startup_funcs.c on BIT(0)
|
||||
SECONDARY: 203: init_apb_dma in components/esp_system/startup_funcs.c on BIT(0)
|
||||
SECONDARY: 204: init_coexist in components/esp_system/startup_funcs.c on BIT(0)
|
||||
SECONDARY: 205: init_cxx_exceptions in components/esp_system/startup_funcs.c on BIT(0)
|
||||
|
@ -4,7 +4,8 @@ if(${target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
endif()
|
||||
|
||||
set(srcs "src/core_dump_common.c"
|
||||
set(srcs "src/core_dump_init.c"
|
||||
"src/core_dump_common.c"
|
||||
"src/core_dump_flash.c"
|
||||
"src/core_dump_uart.c"
|
||||
"src/core_dump_elf.c"
|
||||
@ -37,6 +38,9 @@ idf_component_register(SRCS ${srcs}
|
||||
driver
|
||||
)
|
||||
|
||||
# make sure 'core_dump_init' object file is considered by the linker
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_system_include_coredump_init")
|
||||
|
||||
if(CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF)
|
||||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::esp_app_format)
|
||||
endif()
|
||||
|
24
components/espcoredump/src/core_dump_init.c
Normal file
24
components/espcoredump/src/core_dump_init.c
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#if CONFIG_ESP_COREDUMP_ENABLE
|
||||
|
||||
#include "esp_private/startup_internal.h"
|
||||
#include "esp_core_dump.h"
|
||||
|
||||
// Hook to force the linker to include this file
|
||||
void esp_system_include_coredump_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
ESP_SYSTEM_INIT_FN(init_coredump, SECONDARY, BIT(0), 130)
|
||||
{
|
||||
esp_core_dump_init();
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ESP_COREDUMP_ENABLE */
|
Loading…
Reference in New Issue
Block a user