diff --git a/components/bootloader_support_plus/CHANGELOG.md b/components/bootloader_support_plus/CHANGELOG.md index 1be3a3b53..a8e240c5a 100644 --- a/components/bootloader_support_plus/CHANGELOG.md +++ b/components/bootloader_support_plus/CHANGELOG.md @@ -1,5 +1,11 @@ # ChangeLog +## v0.2.5 - 2024-4-30 + +### Fix: + +* Fix undeclared wdt error when compiling esp32h2. + ## v0.2.4 - 2024-4-11 ### Fix: diff --git a/components/bootloader_support_plus/idf_component.yml b/components/bootloader_support_plus/idf_component.yml index 3aa8b7524..93fc3206e 100644 --- a/components/bootloader_support_plus/idf_component.yml +++ b/components/bootloader_support_plus/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.2.4" +version: "0.2.5" targets: - esp32c2 - esp32c3 diff --git a/components/bootloader_support_plus/src/bootloader_custom_ota.c b/components/bootloader_support_plus/src/bootloader_custom_ota.c index 6f7d4f18b..649ca3040 100644 --- a/components/bootloader_support_plus/src/bootloader_custom_ota.c +++ b/components/bootloader_support_plus/src/bootloader_custom_ota.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -217,10 +217,12 @@ int bootloader_custom_ota_main(bootloader_state_t *bs, int boot_index) so we can know whether the watchdog reset will be triggered here at the test stage. */ #ifdef CONFIG_BOOTLOADER_WDT_ENABLE -#ifndef CONFIG_IDF_TARGET_ESP32C6 - wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL}; -#else +#ifdef CONFIG_IDF_TARGET_ESP32C6 wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT(); +#elif CONFIG_IDF_TARGET_ESP32H2 + wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &LP_WDT}; +#else + wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL}; #endif if ((custom_ota_config.dst_addr % FLASH_SECTOR_SIZE) != 0 || (custom_ota_config.dst_size % FLASH_SECTOR_SIZE != 0)) { return ESP_ERR_INVALID_SIZE;