feat(system): move esp_dbg_stubs_init into component

pull/13114/head
Erhan Kurubas 2024-01-24 01:41:18 +01:00
rodzic 49f3dae095
commit 7234303e9e
7 zmienionych plików z 18 dodań i 15 usunięć

Wyświetl plik

@ -9,6 +9,11 @@ set(srcs
"app_trace_util.c"
"host_file_io.c")
if(CONFIG_ESP_DEBUG_STUBS_ENABLE)
list(APPEND srcs
"debug_stubs.c")
endif()
if(CONFIG_APPTRACE_GCOV_ENABLE)
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
list(APPEND srcs

Wyświetl plik

@ -8,7 +8,8 @@
// 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"
/*
@ -92,3 +93,9 @@ esp_err_t esp_dbg_stub_entry_get(esp_dbg_stub_id_t id, uint32_t *entry)
return ESP_OK;
}
ESP_SYSTEM_INIT_FN(init_dbg_stubs, SECONDARY, BIT(0), 140)
{
esp_dbg_stubs_init();
return ESP_OK;
}

Wyświetl plik

@ -14,7 +14,7 @@
#include "soc/timer_periph.h"
#include "esp_app_trace.h"
#include "esp_freertos_hooks.h"
#include "esp_private/dbg_stubs.h"
#include "dbg_stubs.h"
#include "esp_ipc.h"
#include "hal/wdt_hal.h"
#if CONFIG_IDF_TARGET_ESP32

Wyświetl plik

@ -37,8 +37,7 @@ else()
"system_time.c"
"stack_check.c"
"ubsan.c"
"xt_wdt.c"
"debug_stubs.c")
"xt_wdt.c")
if(CONFIG_ESP_TASK_WDT_EN)
list(APPEND srcs "task_wdt/task_wdt.c")

Wyświetl plik

@ -45,8 +45,6 @@
#include "esp_core_dump.h"
#endif
#include "esp_private/dbg_stubs.h"
#if CONFIG_PM_ENABLE
#include "esp_pm.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
#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
ESP_SYSTEM_INIT_FN(init_pm, SECONDARY, BIT(0), 201)
{

Wyświetl plik

@ -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: 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
# [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: 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)