From 334126315f36268cd4de9637bbfe7f6845f462a7 Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 5 May 2022 11:39:13 +0800 Subject: [PATCH] esp32c2: level up from preview targets --- components/esp_hw_support/port/esp32c2/rtc_init.c | 2 +- components/esp_system/Kconfig | 2 +- components/esp_system/int_wdt.c | 5 ----- tools/idf_py_actions/constants.py | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/components/esp_hw_support/port/esp32c2/rtc_init.c b/components/esp_hw_support/port/esp32c2/rtc_init.c index 4535f0fe3b..37ca6a5742 100644 --- a/components/esp_hw_support/port/esp32c2/rtc_init.c +++ b/components/esp_hw_support/port/esp32c2/rtc_init.c @@ -128,7 +128,7 @@ void rtc_vddsdio_set_config(rtc_vddsdio_config_t config) static void set_ocode_by_efuse(int calib_version) { // ESP32C2-TODO: IDF-4940 - abort(); + ESP_HW_LOGW(TAG, "set_ocode_by_efuse not supported yet"); } static void calibrate_ocode(void) diff --git a/components/esp_system/Kconfig b/components/esp_system/Kconfig index b37e4009ea..d717177546 100644 --- a/components/esp_system/Kconfig +++ b/components/esp_system/Kconfig @@ -366,7 +366,7 @@ menu "ESP System Settings" config ESP_INT_WDT bool "Interrupt watchdog" - default y + default y if !IDF_TARGET_ESP32C2 # add support in IDF-4114 help This watchdog timer can detect if the FreeRTOS tick interrupt has not been called for a certain time, either because a task turned off interrupts and did not turn them on for a long time, or because an diff --git a/components/esp_system/int_wdt.c b/components/esp_system/int_wdt.c index 74a3942524..6f16f3b071 100644 --- a/components/esp_system/int_wdt.c +++ b/components/esp_system/int_wdt.c @@ -149,12 +149,7 @@ void esp_int_wdt_cpu_init(void) esp_register_freertos_tick_hook_for_cpu(tick_hook, cpu_hal_get_core_id()); ESP_INTR_DISABLE(WDT_INT_NUM); -#if SOC_TIMER_GROUPS > 1 esp_rom_route_intr_matrix(cpu_hal_get_core_id(), ETS_TG1_WDT_LEVEL_INTR_SOURCE, WDT_INT_NUM); -#else - // TODO: Clean up code for ESP32-C2, IDF-4114 - ESP_EARLY_LOGW("INT_WDT", "ESP32-C2 only has one timer group"); -#endif /* Set the type and priority to watch dog interrupts */ #if SOC_CPU_HAS_FLEXIBLE_INTC diff --git a/tools/idf_py_actions/constants.py b/tools/idf_py_actions/constants.py index 707f86946a..3f802a1c2b 100644 --- a/tools/idf_py_actions/constants.py +++ b/tools/idf_py_actions/constants.py @@ -25,5 +25,5 @@ if os.name != 'nt': URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf' -SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3'] -PREVIEW_TARGETS = ['linux', 'esp32h2', 'esp32c2'] +SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2'] +PREVIEW_TARGETS = ['linux', 'esp32h2']