diff --git a/components/esp_common/include/esp_private/gdbstub.h b/components/esp_common/include/esp_private/gdbstub.h deleted file mode 100644 index 61c6cc8623..0000000000 --- a/components/esp_common/include/esp_private/gdbstub.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#pragma once - -/* This header exists to avoid making esp_common depend on gdbstub component for panic handler support */ - -typedef void esp_gdbstub_frame_t; - -void esp_gdbstub_panic_handler(esp_gdbstub_frame_t *frame) __attribute__((noreturn)); diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 472cdd6cfe..cee7ad3301 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -10,7 +10,7 @@ idf_component_register(SRCS "intr_alloc.c" # [refactor-todo] requirements due to init code, # should be removable once using component init functions # link-time registration is used. - esp_pm app_update nvs_flash pthread app_trace + esp_pm app_update nvs_flash pthread app_trace esp_gdbstub LDFRAGMENTS "linker.lf") add_subdirectory(port) diff --git a/components/esp_system/panic.c b/components/esp_system/panic.c index 518a75e4c7..196e46ec6d 100644 --- a/components/esp_system/panic.c +++ b/components/esp_system/panic.c @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #include +#include #include "esp_err.h" #include "esp_attr.h" @@ -20,13 +21,6 @@ #include "esp_private/usb_console.h" #include "esp_ota_ops.h" -#if CONFIG_APPTRACE_ENABLE -#include "esp_app_trace.h" -#if CONFIG_SYSVIEW_ENABLE -#include "SEGGER_RTT.h" -#endif -#endif // CONFIG_APPTRACE_ENABLE - #include "esp_core_dump.h" #include "soc/cpu.h" @@ -36,20 +30,11 @@ #include "hal/wdt_types.h" #include "hal/wdt_hal.h" -#if !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT -#include -#include "hal/uart_hal.h" -#endif - #include "esp_private/panic_internal.h" #include "port/panic_funcs.h" #include "sdkconfig.h" -#if CONFIG_ESP_SYSTEM_PANIC_GDBSTUB -#include "esp_private/gdbstub.h" -#endif - #if CONFIG_ESP32_ENABLE_COREDUMP #include "esp_core_dump.h" #endif @@ -67,8 +52,12 @@ #endif #endif // CONFIG_APPTRACE_ENABLE +#if !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT +#include "hal/uart_hal.h" +#endif + #if CONFIG_ESP_SYSTEM_PANIC_GDBSTUB -#include "esp_private/gdbstub.h" +#include "esp_gdbstub.h" #endif bool g_panic_abort = false;