Commit Graph
57 Commits
Author SHA1 Message Date
yinqingzhao ab8568f547 fix(wifi): add workaround for s31 beacon timestamp issue 2026-08-03 21:48:27 +08:00
wuzhenghui f2b2bac778 fix(esp_system): support rom secure boot fast wake feature for esp32s31 2026-07-28 21:32:45 +08:00
harshal.patil a7b29bfda9 change(security): disable Key Manager support on ESP32-C5/P4/S31
The Key Manager hardware peripheral in its current form needs further
design changes before it can be offered as a production feature.
Until a revised peripheral design is available, withdraw ESP-IDF
support for it on all Key Manager capable targets.
2026-07-22 19:58:23 +05:30
muhaidong 7e5d9825da fix(coex): fix coex status get issue 2026-07-16 20:58:09 +08:00
yinqingzhao 7aa7a9da9c fix(wifi): comment out functions from ld files 2026-06-29 16:18:38 +08:00
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
yinqingzhao 63b92cf17e fix(wifi): fix scheduling issue when tasks have the same priority as the Wi-Fi task 2026-06-10 11:48:26 +08:00
harshal.patil c5e03fd55c fix(esp_rom): Patch ets_ecdsa_verify() to include signature bounds check 2026-06-09 10:59:12 +05:30
C.S.M 2acd9b9a7c fix(spi_flash): Fix suspend issue on esp32s31, and add trs timing on other target 2026-06-08 11:15:13 +08:00
nilesh.kale fe257f699e feat: enable Secure Boot, Flash Encryption and Key Manager support for S31 2026-05-26 12:57:34 +08:00
Jiang Jiang Jian fff1564266 Merge branch 'fix/for_cache_after_p4_wb_loss_issue' into 'master'
fix(esp_rom): avoid critical issue in writeback

See merge request espressif/esp-idf!48498
2026-05-21 22:10:00 +08:00
Nilesh Kale d8dbc83e7e Merge branch 'feat/enable_ds_hmac_ecdsa_support_for_esp32s31' into 'master'
feat(hal): add ECDSA,  HMAC and Digital Signature support for esp32s31

Closes IDF-14623, IDF-14624, IDF-14621, and IDF-13062

See merge request espressif/esp-idf!48134
2026-05-20 17:44:14 +08:00
wanglei a52b484faf fix(cache): remove strong symbols in p4 eco0_4 ld
add return value for p4/s31 sync all functions
2026-05-20 17:43:43 +08:00
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
nilesh.kale a530aab0a6 feat: enable key manager and HUK support for S31 2026-05-20 10:17:34 +05:30
Aditya PatwardhanandNilesh Kale e9a9091b59 feat(hal): add HMAC and Digital Signature support for esp32s31
Co-authored-by: Nilesh Kale <nilesh.kale@espressif.com>
2026-05-20 10:17:34 +05:30
Sarvesh Bodakhe 94f226d73b feat(wifi): NAN encrypted datapath (Wi-Fi Aware M1-M4 handshake)
Implement the NAN Data Path encrypted datapath per Wi-Fi Aware v4.0
(§7.1.3.5, §9.5.16):

- Responder + initiator sides of the M1-M4 Shared-Key Descriptor
  exchange, with MIC compute/verify, PTK derivation, and PMK/PMKID
  derivation via PBKDF2-SHA256 over passphrase or pre-shared PMK.
- CSIA / SCIA attribute build + parse, NCS-SK-128 cipher suite.
- Per-NDL security context on ndl_info::security_ctx; per-svc PMK cache.
- ndp_response_indication callback for initiator peer-NDI binding.
- host<->blob ABI migrated from 27 direct esp_nan_* externs to a single
  nan_secure_dp_funcs callback struct in esp_private/wifi.h.
- nan_security.c split out of nan_app.c (~340 lines de-duplicated into
  shared M1-M4 helpers).
- CONFIG_ESP_WIFI_NAN_ENCRYPTED_DATAPATH gates the secure path so non-
  security builds compile out the crypto/handshake code.
- ROM patch (esp32s31): mask ieee80211_encap_esfbuf to match the
  c5/c6/c61 pattern for NAN-capable chips.

Hardening: PMK stack copies zeroized on every return, NDP attribute
parsers bounds-checked, CSID range-checked before shifting, NDL slot
reuse only when handshake state is IDLE, get_csia/scia_len aligned with
their builders on empty input.

API surface: NDP security types moved out of esp_wifi_types_generic.h
into esp_private/wifi.h (internal-only). security pointer dropped from
struct ndp_cb_peer_info. Discovery-side wifi_nan_security_type_t and
the NDP Info callbacks removed (subsumed by csid_bitmap and SSI
respectively).
2026-05-19 11:07:06 +05:30
Konstantin Kondrashov e8609f59a8 feat(bootloader): Support recovery bootloader for ESP32S31 and ESP32P4 2026-05-08 16:45:14 +03:00
muhaidong c8d73ae671 fix(wifi): update rom ld file for fix max connection number issue 2026-05-06 20:48:33 +08:00
Marius Vikhammer e684ca5183 Merge branch 'change/esp_rom_caps_bootloader_offset' into 'master'
change(rom): move bootloader flash offset to esp_rom_caps

Closes IDF-14899

See merge request espressif/esp-idf!48056
2026-04-29 17:27:33 +08:00
Marius Vikhammer 6af582c260 change(rom): add rom caps for bootloader in flash offset 2026-04-29 10:58:50 +08:00
Marius Vikhammer 76983e48fc fix(hal): fix LP WDT stage timeout and reset configuration for ESP32S31 2026-04-28 12:10:23 +08:00
Jiang Jiang Jian bc85b10de7 Merge branch 'bugfix/fix_modem_sleep_flag_clear_failed' into 'master'
fix(wifi): fix modem sleep flag clear failed & fix(pm): fix crash when dtim=0, support coex beacon drop &fix coexist force wake behaviour with offchannel to optimize performance at returning home channel

Closes WIFI-7246, WIFIBUG-1585, and WIFI-7306

See merge request espressif/esp-idf!46830
2026-04-24 15:03:23 +08:00
liuning fa8791b49c fix(pm): fix crash when dtim=0, support coex beacon drop
closes https://github.com/espressif/esp-idf/issues/18387
2026-04-23 20:44:37 +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
Guillaume Souchere da81ec6f47 fix(esp_rom): Set poison check hook for tlsf_walk_pool patch 2026-04-23 07:51:04 +02:00
He Binglin 92e1d04b4f Merge branch 'bugfix/esp_idf_ulp_wakeupcauses_record' into 'master'
fix(ulp): record wakeup causes before lp core request sleep

Closes PM-677 and IDFCI-8878

See merge request espressif/esp-idf!46467
2026-04-22 20:13:17 +08:00
Marius Vikhammer 5f4161b710 Merge branch 'feature/lockup_debug' into 'master'
feat(esp_system): add CPU lockup debug support for esp32h4 and esp32s31

See merge request espressif/esp-idf!47630
2026-04-22 17:52:36 +08:00
hebinglin 0603e0eb23 fix(ulp): record wakeup causes before lp core request sleep 2026-04-22 16:22:11 +08:00
Marius Vikhammer 8e2b416c38 feat(esp_system): add CPU lockup debug support for esp32h4 and esp32s31 2026-04-22 11:11:02 +08:00
Marius Vikhammer 7cd9729e69 feat(esp_rom): add support for esp32s31
Made-with: Cursor
2026-04-21 11:24:49 +08:00
yinqingzhao c3da80ee52 feat(wifi): add esp32s31 wifi support 2026-04-16 20:17:07 +08:00
Jiang Jiang Jian 6af995cb00 Merge branch 'fix/fix_blacklist_issue' into 'master'
fix(wifi): fix wifi blacklist issue& ht info issue& wifi statis dump issue

Closes WIFI-7162

See merge request espressif/esp-idf!44735
2026-04-14 13:57:30 +08:00
Aditya PatwardhanandNilesh Kale bfd3e191bc feat: enable AES, SHA, RSA and ECC support for ESP32S31
Co-authored-by: Nilesh Kale <nilesh.kale@espressif.com>
2026-04-13 10:20:44 +05:30
wangtao@espressif.com 7bdae09182 fix(wifi): fix wifi blacklist issue 2026-04-13 11:31:48 +08:00
Song Ruo Jing 50051b74a5 feat(clk): support for esp32s31 clock tree 2026-04-02 20:39:59 +08:00
armando ebbd9cdb59 feat(psram): support psram device driver 2026-03-31 13:56:43 +08:00
gaoxiaojie 2ba8cc8dc8 fix(rom): remove duplicate symbols in esp32s31.rom.rvfp.ld 2026-03-27 09:01:56 +08:00
Song Ruo Jing 600bf5b6d7 refactor(esp_hal_regi2c): move regi2c implementation from esp_rom to esp_hal_regi2c 2026-03-10 15:08:51 +08:00
C.S.M 587986c84b fix(esp32s31): Add some missing rom file for esp32s31 2026-03-04 11:44:54 +08:00
wuzhenghui 0b27301a09 feat(soc): support esp32s31 lp_aon & rtc_wdt & rtc_timer 2026-02-11 15:03:35 +08:00
Chen Chen eeb24057c4 refactor(hal): graduate systimer hal driver into esp_hal_systimer 2026-02-06 18:08:57 +08:00
C.S.M 17a74c925c Merge branch 'fix/update_esp32s31_rom_freeze' into 'master'
fix(esp32s31): update esp32s31 rom after it's frozen

See merge request espressif/esp-idf!45441
2026-01-29 02:05:51 +08:00
Michael (XIAO Xufeng) 5984b29af5 Merge branch 'refactor/spi_flash_private' into 'master'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation

See merge request espressif/esp-idf!44347
2026-01-28 17:39:51 +08:00
C.S.M e7033132c1 fix(esp32s31): update esp32s31 rom after its freeze 2026-01-28 11:16:36 +08:00
Xiao Xufeng 8dbf23630a refactor(spi_flash): reorganize header files and improve API encapsulation
This commit reorganizes SPI flash header files to better reflect their
visibility and intended usage:

1. Rename `esp_flash_port/` to `esp_flash_chips/`:
   - Better reflects that these headers are for chip driver implementations
   - All chip driver headers moved to `esp_flash_chips/` directory
   - Added README.md explaining semi-public nature of these headers

2. Move internal headers to `esp_private/`:
   - `esp_flash_internal.h` -> `esp_private/esp_flash_internal.h`
   - `memspi_host_driver.h` -> `esp_private/memspi_host_driver.h`

3. Move chip driver related headers to `esp_flash_chips/`:
   - `esp_private/esp_flash_types.h` -> `esp_flash_chips/esp_flash_types.h`
   - `spi_flash/spi_flash_defs.h` -> `esp_flash_chips/spi_flash_defs.h`
   - `spi_flash_override.h` -> `esp_flash_chips/spi_flash_override.h`
   - All `spi_flash_chip_*.h` headers moved to `esp_flash_chips/`

4. Code improvements:
   - Remove unused includes (e.g., `spi_flash_override.h` from `cache_utils.c`)
   - Use public API `esp_flash_get_size()` instead of direct member access
   - Add `esp_flash_is_quad_mode` to linker.lf for IRAM placement

5. Documentation updates:
   - Add README.md in `esp_flash_chips/` explaining semi-public headers
   - Update programming guide with warnings about internal headers
   - Update both English and Chinese documentation

6. Update all references across the codebase:
   - Update includes in `spi_flash` component
   - Update `bootloader_support`, `app_update`, `esp_tee`, `espcoredump`
   - Update example projects

Breaking changes:
- Headers moved to new locations require include path updates
- `custom_flash_driver` example temporarily disabled until external
  components are updated
2026-01-23 03:38:54 +08:00
Marius Vikhammer 8e2eb36b86 feat(esp32s31): add reset reason and panic handler support 2026-01-21 11:55:36 +08:00
Marius Vikhammer 32c6d9d327 feat(rom): added esp-rom support for ESP32-H4 2025-12-29 09:36:32 +08:00
Chen Chen f98b9e2b21 feat(gpio): basic support of gpio on s31 2025-12-26 14:54:56 +08:00