Skip to content

Commit

Permalink
Merge branch 'fix/fix_esp32h2_wdt_not_declared' into 'master'
Browse files Browse the repository at this point in the history
fix: fix bootloader plus esp32h2 rtc wdt not declared

Closes AEG-1531

See merge request ae_group/esp-iot-solution!986
  • Loading branch information
wujiangang committed May 9, 2024
2 parents ce4c75d + 3ae42be commit 158546f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions components/bootloader_support_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion components/bootloader_support_plus/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.2.4"
version: "0.2.5"
targets:
- esp32c2
- esp32c3
Expand Down
10 changes: 6 additions & 4 deletions components/bootloader_support_plus/src/bootloader_custom_ota.c
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 158546f

Please sign in to comment.