Skip to content

Commit 35d2cc0

Browse files
committed
feat: add c61 support on bootloader plus
1 parent db702a5 commit 35d2cc0

File tree

8 files changed

+38
-12
lines changed

8 files changed

+38
-12
lines changed

components/bootloader_support_plus/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ChangeLog
22

3+
## v0.4.0 - 2025-09-08
4+
5+
### Improve:
6+
7+
- Add ESP32-C61 support.
8+
39
## v0.3.9 - 2025-06-17
410

511
### Improve:

components/bootloader_support_plus/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The `bootloader support plus` is an enhanced bootloader based on [custom_bootloa
1515
| ESP32-C5 | N/A | N/A | Supported |
1616
| ESP32-C6 | N/A | Supported | Supported |
1717
| ESP32-H2 | N/A | Supported | Supported |
18+
| ESP32-C61 | N/A | N/A | Supported |
1819

1920
## Compression ratio
2021

components/bootloader_support_plus/README_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bootloader support plus 是乐鑫基于 [ESP-IDF](https://github.com/espressif/e
1515
| ESP32-C5 | N/A | N/A | Supported |
1616
| ESP32-C6 | N/A | Supported | Supported |
1717
| ESP32-H2 | N/A | Supported | Supported |
18+
| ESP32-C61 | N/A | N/A | Supported |
1819

1920
## 压缩率
2021

components/bootloader_support_plus/idf_component.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
version: "0.3.9"
1+
version: "0.4.0"
22
targets:
33
- esp32c2
44
- esp32c3
55
- esp32c5
66
- esp32c6
7+
- esp32c61
78
- esp32
89
- esp32h2
910
description: Provide extra bootloader support, now support upgrading the firmware by decompressing the OTA firmware in the bootloader stage.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MEMORY
2+
{
3+
iram_loader1_seg (RWX) : org = 0x4084A000, len = 0x6000
4+
}
5+
6+
SECTIONS
7+
{
8+
.xz :
9+
{
10+
. = ALIGN(4);
11+
*libbootloader_support_plus.a:(.literal .text .literal.* .text.*)
12+
*libespressif__bootloader_support_plus.a:(.literal .text .literal.* .text.*)
13+
*libespressif__xz.a:(.literal .text .literal.* .text.*)
14+
*libxz.a:(.literal .text .literal.* .text.*)
15+
} > iram_loader1_seg
16+
}

components/bootloader_support_plus/private_include/bootloader_custom_utility.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
#include "bootloader_utility.h"
1111
#include "bootloader_custom_ota.h"
1212

13+
#ifdef CONFIG_BOOTLOADER_WDT_ENABLE
14+
#include "hal/wdt_hal.h"
15+
#if !defined(RWDT_HAL_CONTEXT_DEFAULT)
16+
#if CONFIG_IDF_TARGET_ESP32H2
17+
#define RWDT_HAL_CONTEXT_DEFAULT() {.inst = WDT_RWDT, .rwdt_dev = &LP_WDT}
18+
#else
19+
#define RWDT_HAL_CONTEXT_DEFAULT() {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL}
20+
#endif
21+
#endif // RWDT_HAL_CONTEXT_DEFAULT
22+
#endif
23+
1324
#ifdef __cplusplus
1425
extern "C" {
1526
#endif

components/bootloader_support_plus/src/bootloader_custom_ota.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,8 @@ int bootloader_custom_ota_main(bootloader_state_t *bs, int boot_index)
225225
so we can know whether the watchdog reset will be triggered here at the test stage.
226226
*/
227227
#ifdef CONFIG_BOOTLOADER_WDT_ENABLE
228-
#if (defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C5))
229228
wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
230-
#elif CONFIG_IDF_TARGET_ESP32H2
231-
wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &LP_WDT};
232-
#else
233-
wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL};
234-
#endif
229+
235230
if ((custom_ota_config.dst_addr % FLASH_SECTOR_SIZE) != 0 || (custom_ota_config.dst_size % FLASH_SECTOR_SIZE != 0)) {
236231
return ESP_ERR_INVALID_SIZE;
237232
}

components/bootloader_support_plus/src/bootloader_storage_flash.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
#include "bootloader_custom_malloc.h" // Note, this header is just used to provide malloc() and free() support.
1515

1616
#ifdef CONFIG_BOOTLOADER_WDT_ENABLE
17-
#include "hal/wdt_hal.h"
18-
#if (ESP_IDF_VERSION_MAJOR == 5) && (ESP_IDF_VERSION_MINOR >= 1)
1917
static wdt_hal_context_t rtc_wdt_ctx = RWDT_HAL_CONTEXT_DEFAULT();
20-
#else
21-
static wdt_hal_context_t rtc_wdt_ctx = {.inst = WDT_RWDT, .rwdt_dev = &RTCCNTL};
22-
#endif // ESP_IDF_VERSION_MAJOR
2318
static bool rtc_wdt_ctx_enabled = false;
2419
#endif
2520

0 commit comments

Comments
 (0)