From 99ac68246efef5343abd5892c7f00d62d420e7ce Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Tue, 18 Jul 2023 00:13:31 +0400 Subject: [PATCH] fix(freertos): enable esp32c2 runtime-gdbstub --- components/esp_system/Kconfig | 8 ++++++-- components/freertos/app_startup.c | 2 +- tools/test_apps/.build-test-rules.yml | 6 ------ tools/test_apps/system/gdbstub_runtime/pytest_runtime.py | 1 - 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/components/esp_system/Kconfig b/components/esp_system/Kconfig index 7f9f0a2727..d48f0d7062 100644 --- a/components/esp_system/Kconfig +++ b/components/esp_system/Kconfig @@ -43,9 +43,13 @@ menu "ESP System Settings" config ESP_SYSTEM_GDBSTUB_RUNTIME bool "GDBStub at runtime" select ESP_GDBSTUB_ENABLED - depends on !IDF_TARGET_ESP32C2 help - Invoke gdbstub on the serial port, allowing for gdb to attach to it and to do a debug on runtime. + Enable GDBStub inclusion into firmware. + This allows to debug the target device using serial port: + - Run 'idf.py monitor'. + - Wait for the device to initialize. + - Press Ctrl+C to interrupt the execution and enter GDB attached to your device for debugging. + NOTE: all UART input will be handled by GDBStub. endchoice config ESP_SYSTEM_PANIC_REBOOT_DELAY_SECONDS diff --git a/components/freertos/app_startup.c b/components/freertos/app_startup.c index 99ea6ae570..2da45377c7 100644 --- a/components/freertos/app_startup.c +++ b/components/freertos/app_startup.c @@ -75,7 +75,7 @@ void esp_startup_start_app(void) // Initialize the cross-core interrupt on CPU0 esp_crosscore_int_init(); -#if CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME && !CONFIG_IDF_TARGET_ESP32C2 +#if CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME void esp_gdbstub_init(void); esp_gdbstub_init(); #endif // CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME diff --git a/tools/test_apps/.build-test-rules.yml b/tools/test_apps/.build-test-rules.yml index 5752cbd62f..765576d5fa 100644 --- a/tools/test_apps/.build-test-rules.yml +++ b/tools/test_apps/.build-test-rules.yml @@ -130,12 +130,6 @@ tools/test_apps/system/gdb_loadable_elf: temporary: true reason: target esp32c6, esp32h2 is not supported yet -tools/test_apps/system/gdbstub_runtime: - disable_test: - - if: IDF_TARGET in ["esp32c2", "esp32h2"] - temporary: true - reason: resolve IDF-7264 - tools/test_apps/system/longjmp_test: enable: - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3"] diff --git a/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py b/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py index 864828e498..2154829aa1 100644 --- a/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py +++ b/tools/test_apps/system/gdbstub_runtime/pytest_runtime.py @@ -11,7 +11,6 @@ from test_panic_util import PanicTestDut # noqa: E402 @pytest.mark.supported_targets -@pytest.mark.temp_skip_ci(targets=['esp32c2', 'esp32h2'], reason='resolve IDF-7264') @pytest.mark.generic def test_gdbstub_runtime(dut: PanicTestDut) -> None: dut.expect_exact('tested app is runnig.')