From 22d771bf514476cb00978d3c6546ba6bbbabf63d Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Fri, 22 Jul 2022 15:11:15 +0200 Subject: [PATCH] esp32c2: fix gcov example build --- components/esp_system/CMakeLists.txt | 4 ---- components/esp_system/port/soc/esp32c2/CMakeLists.txt | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 85f66a6cc6..f2fff07446 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -26,10 +26,6 @@ else() "xt_wdt.c" "debug_stubs.c") - if(NOT (${target} STREQUAL "esp32c2")) - list(APPEND srcs "debug_stubs.c") - endif() - if(CONFIG_ESP_SYSTEM_USE_EH_FRAME) list(APPEND srcs "eh_frame_parser.c") endif() diff --git a/components/esp_system/port/soc/esp32c2/CMakeLists.txt b/components/esp_system/port/soc/esp32c2/CMakeLists.txt index 06734055f0..d77109f3b5 100644 --- a/components/esp_system/port/soc/esp32c2/CMakeLists.txt +++ b/components/esp_system/port/soc/esp32c2/CMakeLists.txt @@ -4,7 +4,9 @@ set(srcs "clk.c" "cache_err_int.c" "../../arch/riscv/expression_with_stack.c" "../../arch/riscv/expression_with_stack_asm.S" - "../../arch/riscv/panic_arch.c") + "../../arch/riscv/panic_arch.c" + "../../arch/riscv/debug_stubs.c") + add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" ${srcs}) target_sources(${COMPONENT_LIB} PRIVATE ${srcs})