Commit Graph

1327 Commits

Author SHA1 Message Date
Xiao Xufeng
3e8389cc31 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-07-15 18:57:08 +08:00
harshal.patil
3e246a64a3 fix(esp_common/esp_fault): make ESP_FAULT_ASSERT survive optimization
ESP_FAULT_ASSERT(C) was silently deleted by the optimizer when C is a cached
flag/status already proven by a preceding `if (!C) return/goto`: the compiler
folds C to a constant and drops all three checks, removing the fault-injection
protection with no warning.
2026-06-18 17:00:42 +05:30
harshal.patil
0c2ebe3180 fix(secure_boot): range-check ECDSA r,s in bootloader before ROM verify 2026-06-16 10:38:59 +05:30
Jiang Jiang Jian
6d7fde3e05 Merge branch 'feat/esp_trace_example_v6.1' into 'release/v6.1'
esp_trace example library integration (v6.1)

See merge request espressif/esp-idf!49089
2026-06-13 23:39:22 +08:00
Aditya Patwardhan
4f2f37ca69 change(secure_boot): mark ECDSA based Secure Boot V2 as insecure on affected SoCs
ECDSA based Secure Boot V2 is not functional for certain input vectors on
ESP32-C5/C61/H2/P4 and on the preview targets ESP32-H4/H21. RSA based Secure
Boot V2 is the recommended scheme where the SoC supports it. This issue will be
fixed in a future hardware ECO revision; more details will be shared through the
hardware errata document.

A new hidden Kconfig option SECURE_BOOT_V2_ECDSA_INSECURE marks the affected
mass-production SoCs (ESP32-C5/C61/H2/P4). On these SoCs, when hardware Secure
Boot V2 is enabled, the ECDSA (V2) signing scheme is no longer offered by
default; it must be turned on explicitly via SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
under "Allow potentially insecure options" (CONFIG_SECURE_BOOT_INSECURE). App
signing without hardware Secure Boot is not affected. Note that ESP32-C61 has no
RSA based Secure Boot V2, so it has no Secure Boot scheme enabled by default.

The preview targets ESP32-H4 and ESP32-H21 mark ECDSA Secure Boot V2 as not
supported in their SoC capabilities instead of using the option above. As
ESP32-H4 has no other Secure Boot V2 scheme, Secure Boot is disabled entirely on
it; ESP32-H21 retains RSA based Secure Boot V2.

The security documentation keeps the ECDSA Secure Boot V2 content visible and
adds a warning describing the limitation (including that ECDSA Secure Boot V2 on
ESP32-C61 is not recommended for production). CI apps that exercise ECDSA Secure
Boot V2 on the affected SoCs set CONFIG_SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
accordingly.
2026-06-10 03:10:27 +05:30
hebinglin
5ff1c38cb8 fix(ulp): fix lp uart keep wakeup triggered 2026-06-08 19:29:53 +08:00
Erhan Kurubas
2d2d200ebd feat(esp_trace): add example to demonstrate external lib integration 2026-06-01 09:25:47 +03:00
hebinglin
defa3ccaa9 change(examples): add esp32h4 lslp ci test 2026-05-21 22:07:07 +08:00
Wu Zheng Hui
91e66a8d19 Merge branch 'feat/support_io_edge_wakeup' into 'master'
feat(esp_hw_support): support rtc io edge wakeup sleep

Closes FCS-1880 and IDF-11812

See merge request espressif/esp-idf!48410
2026-05-20 19:37:35 +08:00
wuzhenghui
e491855cc6 feat(example): update gpio edge wakeup support in deepsleep example 2026-05-20 11:04:04 +08:00
C.S.M
854d00cab1 feat(usj): Add usb serial jtag support on esp32s31 2026-05-19 16:16:31 +08:00
Renz Bagaporo
0af4d60720 ci(esp32h4): use soc caps flags for base mac address test 2026-05-18 15:43:13 +09:00
Renz Bagaporo
55b54f33ee test(ci): reenable skipped ESP32-H4 base mac address test 2026-05-18 10:02:03 +09:00
Marius Vikhammer
84fdbccaf0 fix(examples): raise efuse ESP32-P4 CI partition offset for larger bootloader
Recovery bootloader support increased the ESP32-P4 bootloader image enough
that it no longer fits before 0xe000. Moving the partition table to 0x10000
restores slack for CI builds using secure boot and flash encryption together.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 09:54:27 +08:00
Marius Vikhammer
1a65724653 Merge branch 'ci/h4_core_sys_test' into 'master'
test(ci): re-enable ESP32-H4 in core system test apps

Closes IDF-15602, IDF-15604, IDF-15605, IDF-15606, and IDF-15612

See merge request espressif/esp-idf!48454
2026-05-13 14:24:16 +08:00
Marius Vikhammer
8f6ea2a1ba test(ci): re-enable ESP32-H4 in core system test apps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 09:00:12 +08:00
Marius Vikhammer
73dc40eb8a Merge branch 'feature/s31_lp_i2c' into 'master'
feat(ulp): support I2C on ULP for S31

Closes IDF-14635

See merge request espressif/esp-idf!48405
2026-05-13 08:31:29 +08:00
Konstantin Kondrashov
485ab9aa29 Merge branch 'feature/recovery_bootloader_support' into 'master'
feat(bootloader): Support recovery bootloader for ESP32P4

Closes IDF-15653 and IDF-13165

See merge request espressif/esp-idf!48215
2026-05-12 23:24:40 +03:00
Marius Vikhammer
ab9cf37a1b feat(ulp): support I2C on ULP for S31 2026-05-12 17:32:23 +08:00
Chen Jichang
3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
Chen Jichang
645ff40cde ci(esp32h4): enable ci target test 2026-05-11 16:48:58 +08:00
Marius Vikhammer
2fa1906b0a Merge branch 'feature/s31_lp_mailbox' into 'master'
feat(ulp): enable LP mailbox on S31

Closes IDF-14637

See merge request espressif/esp-idf!48218
2026-05-09 10:58:41 +08:00
Konstantin Kondrashov
e8609f59a8 feat(bootloader): Support recovery bootloader for ESP32S31 and ESP32P4 2026-05-08 16:45:14 +03:00
Marius Vikhammer
6023f07868 feat(ulp): add support for mailbox on S31 2026-05-08 14:06:04 +08:00
Samuel Obuch
44385d91fc Merge branch 'feat/test_lp_core_debugging' into 'master'
feat(ulp): add pytest for debugging example

See merge request espressif/esp-idf!45965
2026-05-07 17:08:19 +02:00
Jiang Jiang Jian
39f0ef3528 Merge branch 'feat/support_s31_sleep_features' into 'master'
feat(esp_hw_support): support esp32s31 lowpower features

Closes IDF-5660, IDF-14643, IDF-14645, IDF-14647, IDF-14648, IDF-14784, PM-708, and PM-714

See merge request espressif/esp-idf!47216
2026-05-07 19:22:58 +08:00
Samuel Obuch
35ee7beb0e feat(ulp): add pytest for debugging example 2026-05-07 11:59:44 +02:00
Erhan Kurubas
7aabb0155b Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20260424' into 'master'
feat(tools): update openocd version to v0.12.0-esp32-20260424

Closes OCD-892, OCD-1371, and DOC-14459

See merge request espressif/esp-idf!48003
2026-05-07 09:09:13 +02:00
wuzhenghui
d3c5129050 fix(driver): fix retention unsupported mouldes TOP pd test 2026-05-07 12:02:05 +08:00
wuzhenghui
f1f3f204fe feat(esp_hw_support): support esp32s31 lightsleep/deepsleep example 2026-05-06 20:15:01 +08:00
Marius Vikhammer
353b637e16 Merge branch 'feature/s31_lp_uart_ulp' into 'master'
feat(ulp): add lp uart support for ULP on S31

Closes IDF-14634 and IDF-15567

See merge request espressif/esp-idf!48055
2026-05-06 15:43:12 +08:00
Konstantin Kondrashov
6adb99a389 Merge branch 'feature/support_efuses_esp32s31' into 'master'
feat(efuse): Support efuses for ESP32S31

Closes IDF-14688

See merge request espressif/esp-idf!47986
2026-04-30 12:08:52 +03:00
Konstantin Kondrashov
c29532f98c feat(efuse): Support efuses for ESP32S31 2026-04-29 15:50:32 +03:00
Marius Vikhammer
66d1d594e4 feat(ulp): add lp uart support for ULP on S31 2026-04-29 16:20:43 +08:00
Samuel Obuch
4b1e6ea5f2 ci(esp32p4): enable sysview_tracing test missed before 2026-04-28 11:59:44 +02:00
Armando (Dou Yiwen)
85b324c188 Merge branch 'feat/psram_xip_h4' into 'master'
psram: xip psram support on h4

Closes IDF-12349

See merge request espressif/esp-idf!40968
2026-04-28 08:31:23 +00:00
Sudeep Mohanty
cc025fa3d5 Merge branch 'fix/lp_uart_data_bits' into 'master'
fix(ulp/lp_core): fix LP UART data_bits validation and add full word-length test coverage

Closes PM-715, PM-660, IDFCI-10410, and IDFCI-10464

See merge request espressif/esp-idf!47432
2026-04-28 08:43:03 +02:00
Marius Vikhammer
defe1cde71 feat(ulp/lp_spi): bring up LP SPI on ESP32-S31
Add LP SPI HAL LL layer for ESP32-S31 and ESP32-P4, enable the
peripheral in soc_caps, and port the HP-side and LP-core-side SPI
drivers to use the new LL abstraction.
2026-04-28 10:20:02 +08:00
armando
80db6f440c ci(psram): enable xip psram test on h4 2026-04-28 09:37:03 +08:00
Sudeep Mohanty
359cec50bb test(lp_core): use soc_filtered_targets for all LP core pytest parametrization
Several LP core pytest files were either hardcoded to specific chip lists
or using a less-precise SOC capability filter:

- test_lp_core_multi_device: was locked to ['esp32c6'] pending a workaround
  for LP I2C on esp32p4; all three active LP core chips now have
  SOC_LP_I2C_SUPPORTED=1, so switch to soc_filtered_targets.

- test_lp_uart_wakeup_modes: was using SOC_LP_CORE_SUPPORTED which is
  semantically wrong for a UART test; change to SOC_ULP_LP_UART_SUPPORTED.

- LP core example pytests (build_system, interrupt, gpio_intr_pulse_counter,
  lp_timer_interrupt): replace hardcoded ['esp32c5', 'esp32c6', 'esp32p4']
  with soc_filtered_targets('SOC_LP_CORE_SUPPORTED == 1') so that new
  chips automatically get coverage when their SOC cap is enabled.
2026-04-23 10:10:05 +02:00
Marius Vikhammer
10637dbf5e feat(ulp): add support for ulp on esp32s31 2026-04-20 14:45:23 +08:00
Mahavir Jain
204549529a Merge branch 'fix_otatool_serial_handoff' into 'master'
fix(otatool): fix flaky serial port handoff in otatool CI test

Closes IDFCI-3263, IDFCI-3302, IDFCI-3402, IDFCI-3410, IDFCI-4548, IDFCI-5191, IDFCI-6937, and IDFCI-7329

See merge request espressif/esp-idf!47318
2026-04-15 15:48:15 +05:30
Wu Zheng Hui
ec5f956516 Merge branch 'doc/fix_sleep_mode_doc' into 'master'
docs(system): update GPIO wakeup section for clarity on EXT0 and EXT1 support

See merge request espressif/esp-idf!47362
2026-04-14 16:38:34 +08:00
Samuel Obuch
38f963b2a5 ci: disable h21-usj tests because of unstable runner 2026-04-13 14:59:20 +02:00
armando
bb2fd61013 fix(xip): fixed xip example 2026-04-09 16:58:03 +08:00
wuzhenghui
4b874b58af docs(system): update GPIO wakeup section for clarity on EXT0 and EXT1 support 2026-04-08 16:59:03 +08:00
hrushikesh.bhosale
926d5ee6ad fix(examples/system/ota/otatool): fix serial port contention in pytest
The otatool pytest calls dut.serial.close() and then immediately
launches otatool_example.py as a subprocess that re-opens the same
serial port via esptool. This fails intermittently because:

1. pytest-embedded's QueueFeederThread still holds a reference to
   the serial port file descriptor when close() returns, causing
   'argument must be an int, or have a fileno() method' error.

2. The OS has not fully released the serial port by the time the
   subprocess tries to open it.

Add a delay after serial close and retry logic for the subprocess
to handle transient serial port contention.

Made-with: Cursor
2026-04-07 13:47:28 +05:30
C.S.M
152b5ccb4c ci(esp32s31): Add ci target test for esp32s31 2026-04-03 11:38:45 +08:00
Marius Vikhammer
e30e747d20 Merge branch 'docs/fix_check_readme_links' into 'master'
docs(examples): fix broken README links found by check_readme_links CI

See merge request espressif/esp-idf!47055
2026-04-01 14:16:51 +08:00
armando
ebbd9cdb59 feat(psram): support psram device driver 2026-03-31 13:56:43 +08:00