forked from espressif/esp-idf
Merge branch 'feature/move_esp_dbg_stubs_init_into_component' into 'master'
feat(system): move esp_dbg_stubs_init into apptrace component Closes IDF-8767 See merge request espressif/esp-idf!28684
This commit is contained in:
@ -9,6 +9,11 @@ set(srcs
|
|||||||
"app_trace_util.c"
|
"app_trace_util.c"
|
||||||
"host_file_io.c")
|
"host_file_io.c")
|
||||||
|
|
||||||
|
if(CONFIG_ESP_DEBUG_STUBS_ENABLE)
|
||||||
|
list(APPEND srcs
|
||||||
|
"debug_stubs.c")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_APPTRACE_GCOV_ENABLE)
|
if(CONFIG_APPTRACE_GCOV_ENABLE)
|
||||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
// Currently one stub is used for GCOV functionality
|
// Currently one stub is used for GCOV functionality
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "esp_private/dbg_stubs.h"
|
#include "esp_private/startup_internal.h"
|
||||||
|
#include "dbg_stubs.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -92,3 +93,9 @@ esp_err_t esp_dbg_stub_entry_get(esp_dbg_stub_id_t id, uint32_t *entry)
|
|||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ESP_SYSTEM_INIT_FN(init_dbg_stubs, SECONDARY, BIT(0), 140)
|
||||||
|
{
|
||||||
|
esp_dbg_stubs_init();
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
@ -14,7 +14,7 @@
|
|||||||
#include "soc/timer_periph.h"
|
#include "soc/timer_periph.h"
|
||||||
#include "esp_app_trace.h"
|
#include "esp_app_trace.h"
|
||||||
#include "esp_freertos_hooks.h"
|
#include "esp_freertos_hooks.h"
|
||||||
#include "esp_private/dbg_stubs.h"
|
#include "dbg_stubs.h"
|
||||||
#include "esp_ipc.h"
|
#include "esp_ipc.h"
|
||||||
#include "hal/wdt_hal.h"
|
#include "hal/wdt_hal.h"
|
||||||
#if CONFIG_IDF_TARGET_ESP32
|
#if CONFIG_IDF_TARGET_ESP32
|
||||||
|
@ -37,8 +37,7 @@ else()
|
|||||||
"system_time.c"
|
"system_time.c"
|
||||||
"stack_check.c"
|
"stack_check.c"
|
||||||
"ubsan.c"
|
"ubsan.c"
|
||||||
"xt_wdt.c"
|
"xt_wdt.c")
|
||||||
"debug_stubs.c")
|
|
||||||
|
|
||||||
if(CONFIG_ESP_TASK_WDT_EN)
|
if(CONFIG_ESP_TASK_WDT_EN)
|
||||||
list(APPEND srcs "task_wdt/task_wdt.c")
|
list(APPEND srcs "task_wdt/task_wdt.c")
|
||||||
|
@ -45,8 +45,6 @@
|
|||||||
#include "esp_core_dump.h"
|
#include "esp_core_dump.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "esp_private/dbg_stubs.h"
|
|
||||||
|
|
||||||
#if CONFIG_PM_ENABLE
|
#if CONFIG_PM_ENABLE
|
||||||
#include "esp_pm.h"
|
#include "esp_pm.h"
|
||||||
#include "esp_private/pm_impl.h"
|
#include "esp_private/pm_impl.h"
|
||||||
@ -273,14 +271,6 @@ ESP_SYSTEM_INIT_FN(init_xt_wdt, CORE, BIT(0), 170)
|
|||||||
}
|
}
|
||||||
#endif // CONFIG_ESP_XT_WDT
|
#endif // CONFIG_ESP_XT_WDT
|
||||||
|
|
||||||
#if CONFIG_ESP_DEBUG_STUBS_ENABLE
|
|
||||||
ESP_SYSTEM_INIT_FN(init_dbg_stubs, SECONDARY, BIT(0), 200)
|
|
||||||
{
|
|
||||||
esp_dbg_stubs_init();
|
|
||||||
return ESP_OK;
|
|
||||||
}
|
|
||||||
#endif // CONFIG_ESP_DEBUG_STUBS_ENABLE
|
|
||||||
|
|
||||||
#if CONFIG_PM_ENABLE
|
#if CONFIG_PM_ENABLE
|
||||||
ESP_SYSTEM_INIT_FN(init_pm, SECONDARY, BIT(0), 201)
|
ESP_SYSTEM_INIT_FN(init_pm, SECONDARY, BIT(0), 201)
|
||||||
{
|
{
|
||||||
|
@ -75,9 +75,11 @@ 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: 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)
|
SECONDARY: 120: sysview_init in components/app_trace/sys_view/esp/SEGGER_RTT_esp.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
|
# the rest of the components which are initialized from startup_funcs.c
|
||||||
# [refactor-todo]: move init calls into respective components
|
# [refactor-todo]: move init calls into respective components
|
||||||
SECONDARY: 200: init_dbg_stubs in components/esp_system/startup_funcs.c on BIT(0)
|
|
||||||
SECONDARY: 201: init_pm in components/esp_system/startup_funcs.c on BIT(0)
|
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: 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: 203: init_apb_dma in components/esp_system/startup_funcs.c on BIT(0)
|
||||||
|
Reference in New Issue
Block a user