Commit Graph
24 Commits
Author SHA1 Message Date
Xiao Xufeng 789ce684c9 fix(mmap): fixed some API read wrong data via mmap when flash being erased/written while XIP on PSRAM
Before:

The cache won't be disabled when XIP on psram. But during flash
erasing/programming, read data will be courrupt.

When XIP in psram is enabled, the image is not mapped to the cache so
usually there will be no flash access. The only way to read from flash
is via the driver or use mmap. The driver has protection during erasing,
while th mmap region not.

Now:

Mmap APIs provide a flag to make mmap->unmap region mutually exclusive
to flash erase/programming when XIP from psram. SPI Flash write APIs
will benefit from this. When the flag is used, no concurrent access to
mapped region will happen while writing; otherwise the cache will be
disable to avoid data corruption.

Most ESP-IDF APIs calls mmap with this flag. As for users calling
mmap-like APIs directly, they can choose whether to enable this by a
flag.

Closes https://github.com/espressif/esp-idf/issues/14897
2026-06-16 01:00:43 +08:00
harshal.patil f68bc1ba9f fix(secure_boot): range-check ECDSA r,s in bootloader before ROM verify 2026-06-12 14:38:47 +05:30
harshal.patil c5e03fd55c fix(esp_rom): Patch ets_ecdsa_verify() to include signature bounds check 2026-06-09 10:59:12 +05:30
wanglei 751a75a982 fix(esp_rom): implement cache writeback related apis in iram
avoid critical issues caused by manual cache writeback and conflicting
writes. The issue exist on chips after esp32p4
2026-05-20 17:43:43 +08:00
Guillaume Souchere a56354e9ab feat(heap): move TLSF ROM patches and related files from esp_rom to heap
The TLSF ROM patch code (rom_patch_tlsf.c, rom_patch_multi_heap.c),
their headers, and the per-target *.rom.heap.ld linker scripts are
semantically owned by the heap component, not esp_rom. Move them
accordingly:

- components/esp_rom/patches/esp_rom_tlsf.c
  → components/heap/rom_patches/rom_patch_tlsf.c
- components/esp_rom/patches/esp_rom_multi_heap.c
  → components/heap/rom_patches/rom_patch_multi_heap.c
- components/esp_rom/include/esp_rom_tlsf.h
  → components/heap/rom_patches/include/rom_patch_tlsf.h
- components/esp_rom/include/esp_rom_multi_heap.h
  → components/heap/rom_patches/include/rom_patch_multi_heap.h
- components/esp_rom/<target>/ld/<target>.rom.heap.ld (×8)
  → components/heap/port/<target>/ld/<target>.rom.heap.ld

Update heap/CMakeLists.txt to:
- use target_linker_script() directly for *.rom.heap.ld
- guard post-registration ROM patch setup with NOT BOOTLOADER_BUILD
- drop stale CONFIG_HEAP_TLSF_CHECK_PATCH symbol reference
- drop esp_rom_include_multi_heap_patch from TLSF_CHECK_PATCH guard

Remove the corresponding entries from esp_rom/CMakeLists.txt.
2026-04-23 12:21:31 +02:00
wuzhenghui c59c3a2c8d fix(esp_rom): sync spi_flash_disable/enable_cache patches to rom implementation 2026-03-09 21:21:24 +08:00
Chen Chen eeb24057c4 refactor(hal): graduate systimer hal driver into esp_hal_systimer 2026-02-06 18:08:57 +08:00
Chen Jichang f0884713ca feat(esp32h4): remove esp32h4 beta5 support 2026-02-05 11:40:56 +08:00
Alexey Lapshin f6cd2fe970 Merge branch 'feature/update-toolchain-to-esp-15.2.0_20250929.4-6d3fdb7' into 'master'
Make Picolibc the default libc

See merge request espressif/esp-idf!43620
2025-12-04 01:14:01 +04:00
Alexey Lapshin 31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
morris 3d31f510d0 refactor(hal_wdt): esp_hal_wdt also maintains the ROM implementation 2025-12-01 23:16:09 +08:00
Chen Jichang 0ce7125942 fix(esp_rom): update H4 MP ld files 2025-11-21 16:18:23 +08:00
Marius Vikhammer 4ebad0a47d fix(rom): fixed systimer hal implementation from ROM always being used on P4 2025-11-20 15:36:26 +08:00
Song Ruo Jing 4b8633cc2b refactor(rom/gpio): add 'rom_' prefix to GPIO ROM functions 2025-11-07 15:26:52 +08:00
Chen Jichang d0ad1145fc feat(h4mp): update rom linker (part3) 2025-08-18 14:24:12 +08:00
Xiao Xufeng 83ca12c8e0 fix(esp_flash): fixed issue of escaping boundary check
Also patched corresponding ROM functions
2025-06-24 15:30:11 +08:00
Marius Vikhammer 12e9d6514a fix(console): fixed secondary console not working on all chips without VFS 2025-03-07 14:41:19 +08:00
Chen Jichang a74f9cbe63 feat(esp32h4): add esp_rom and efuse files (stage4) 2025-02-25 19:30:03 +08:00
laokaiyao b16ed57b2e esp32h4: removed esp32h4 related files 2023-04-23 12:03:07 +00:00
morris 4123e611dc esp_rom: add common ROM API to update CPU tick rate 2023-04-19 13:21:26 +08:00
jiangguangming 87f2eb9e2a esp_rom: put rom cache related functions to cache.h 2023-03-07 14:51:24 +08:00
wuzhenghui 44df5b31af feature: add ram loadable app support 2023-02-01 17:57:22 +08:00
jiangguangming 618dfaa67a esp_rom: add rom api esp_rom_uart_set_as_console for riscv chips 2022-11-10 16:57:28 +08:00
laokaiyao 8677216576 esp32h2: renaming esp32h2 to esp32h4 2022-11-08 17:05:33 +08:00