Commit Graph

1245 Commits

Author SHA1 Message Date
harshal.patil
5ed711bc06 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 19:41:56 +05:30
harshal.patil
5f824c8683 fix(secure_boot): range-check ECDSA r,s in bootloader before ROM verify 2026-06-12 17:32:38 +05:30
Aditya Patwardhan
94be07050f 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 18:06:48 +05:30
nilesh.kale
62a67bbcb8 fix(examples): solve OTA resumption CI failures (backport v6.0)
This commit started threaded server to serve multiple clients
simultaneously in individual thread, eliminating the single-threaded
server limitation that caused the device's mid-OTA reconnect to time
out while the previous connection was still being torn down.

SSL is now wrapped per-connection inside the handler thread (in
setup()) so the main accept loop never blocks on a TLS handshake.

Closes IDFCI-3505

(cherry picked from commit 7647d54271)
2026-05-15 14:08:39 +05:30
Jiang Jiang Jian
91b378565a Merge branch 'feat/test_lp_core_debugging_v6.0' into 'release/v6.0'
feat(ulp): add pytest for debugging example (v6.0)

See merge request espressif/esp-idf!48255
2026-05-15 14:08:07 +08:00
Jiang Jiang Jian
a7b604fd33 Merge branch 'fix/lp_uart_data_bits_v6.0' into 'release/v6.0'
fix(ulp/lp_core): fix LP UART data_bits validation and add full word-length test coverage (v6.0)

See merge request espressif/esp-idf!48031
2026-05-15 14:03:13 +08:00
Marius Vikhammer
bac55534a7 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 13:59:23 +03:00
Konstantin Kondrashov
a742bd519a feat(bootloader): Support recovery bootloader for ESP32P4/C61 2026-05-13 10:18:15 +03:00
Alexey Gerenkov
412e8e4ea4 Merge branch 'fix/apptrace_uart_flush_v6.0' into 'release/v6.0'
Replace ISR based Uart TX with polling (v6.0)

See merge request espressif/esp-idf!46816
2026-05-13 01:03:05 +08:00
Samuel Obuch
ecf063c2f4 feat(ulp): add pytest for debugging example 2026-05-12 13:09:56 +02:00
Erhan Kurubas
e4ad52292a fix(app_trace): implement uart TX without using ISR 2026-05-12 10:13:07 +02:00
hrushikesh.bhosale
1713fd16c7 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-05-12 11:26:34 +05:30
Sudeep Mohanty
11dc12d2dd test(lp_core): use soc_filtered_targets for all LP core pytest parametrization
Made-with: Cursor
2026-04-28 16:14:00 +02:00
Marius Vikhammer
f823e050fe Merge branch 'docs/fix_check_readme_links_v6.0' into 'release/v6.0'
docs(examples): fix broken README links found by check_readme_links CI (v6.0)

See merge request espressif/esp-idf!47058
2026-04-28 09:02:35 +08:00
Fu Hanxi
ad1d17a794 ci: rename eco tags to revision 2026-04-09 10:43:34 +02:00
Marius Vikhammer
5d6bb788ca docs(examples): fix broken README links found by check_readme_links CI
The hw-reference/modules-and-boards page was removed from esp-idf docs
and moved to esp-dev-kits. The ESP32-S2-Saola-1 user guide similarly
moved. The configure-builtin-jtag link used the now-obsolete chip-less
stable URL format.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 11:37:03 +08:00
Jiang Jiang Jian
d84bfab4b5 Merge branch 'fix/esp_idf_p4_uart_wakeupmode0_v6.0' into 'release/v6.0'
change(example): change uart wakeup mode 0 edge threshold(v6.0)

See merge request espressif/esp-idf!46374
2026-03-24 10:56:08 +08:00
hebinglin
0231ab2694 change(example): change uart wakeup mode 0 edge threshold 2026-03-23 18:09:48 +08:00
Marius Vikhammer
e741963f13 Merge branch 'ci/common-components-release-v6.0' into 'release/v6.0'
ci: update build-test-rules to use common_components (v6.0)

See merge request espressif/esp-idf!45547
2026-03-23 09:31:28 +08:00
Jiang Jiang Jian
4d9c8f3064 Merge branch 'feature/improve_ulp_delay_api_v6.0' into 'release/v6.0'
feat(ulp): Improved ULP delay accuracy and removed floating point operations (v6.0)

See merge request espressif/esp-idf!46423
2026-03-21 14:32:29 +08:00
Konstantin Kondrashov
6fe2cf575f feat(ulp): Improved ULP delay API accuracy and removed floating point operations
Closes https://github.com/espressif/esp-idf/issues/17494
Closes https://github.com/espressif/esp-idf/issues/16891
2026-03-20 16:44:14 +08:00
igor.udot
e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Ashish Sharma
8c6845bb96 feat(secure_boot): adds api to verify data partition integrity
Closes https://github.com/espressif/esp-idf/issues/17482
2026-03-20 15:08:54 +08:00
Jiang Jiang Jian
c2dec1e7e2 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20260304_v6.0' into 'release/v6.0'
feat(tools): update openocd version to v0.12.0-esp32-20260304 (v6.0)

See merge request espressif/esp-idf!46363
2026-03-20 10:39:33 +08:00
Jiang Jiang Jian
ecf1d75727 Merge branch 'fix/fix_io_wakeup_issues_v6.0' into 'release/v6.0'
fix(esp_hw_support): make esp_deep_sleep_enable_gpio_wakeup available to PD_TOP lightsleep (v6.0)

See merge request espressif/esp-idf!45869
2026-03-20 10:13:54 +08:00
Marius Vikhammer
5881c4a1b8 Merge branch 'fix/efuse_example_test_for_h2_v6.0' into 'release/v6.0'
fix(examples): Use another efuse block for custom efuse table (v6.0)

See merge request espressif/esp-idf!45338
2026-03-20 10:07:00 +08:00
Marius Vikhammer
db06a929fa Merge branch 'fix/lp_adc_not_working_on_lp_core_v6.0' into 'release/v6.0'
Fixes for LP ADC to work when used from the LP core (v6.0)

See merge request espressif/esp-idf!45762
2026-03-20 09:20:08 +08:00
Fu Hanxi
beaaa115f3 Merge branch 'ci/missing_config_pre_commit_hook_v6.0' into 'release/v6.0'
ci: add pre-commit hook to detect missing configs (v6.0)

See merge request espressif/esp-idf!46205
2026-03-20 01:10:09 +01:00
Fu Hanxi
98e407ec45 Merge branch 'ci/improve-tests_v6.0' into 'release/v6.0'
tests: change wifi tests expect timeout to 60 (v6.0)

See merge request espressif/esp-idf!46545
2026-03-20 00:57:25 +01:00
Evgeny Torbin
6d5bd83551 ci: fix pre-commit hook errors 2026-03-12 12:34:23 +01:00
Evgeny Torbin
0070b687b5 ci: remove unused test cases 2026-03-12 12:34:23 +01:00
Fu Hanxi
84d80dd37d tests: change wifi tests expect timeout to 60
- wifi_router
- wifi_ap
- wifi_high_traffic
2026-03-12 15:59:26 +08:00
Samuel Obuch
1193182b7b ci(esp32p4): enable gcov test 2026-03-12 08:48:20 +01:00
Chen Jichang
04df934c05 refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component 2026-03-06 18:14:22 +08:00
wuzhenghui
b219910a95 fix(example): fix uninitialized gpio/rtcio in deepsleep example 2026-03-05 11:29:37 +08:00
Mahavir Jain
a0d933e234 Merge branch 'fix/add_check_for_range_request_supported_by_server_during_ota_resumption_v6.0' into 'release/v6.0'
fix(esp_https_ota): added a check if range request is supported during OTA resumption is enabled (v6.0)

See merge request espressif/esp-idf!45818
2026-02-12 09:48:26 +05:30
nilesh.kale
4e434f8eb8 fix(esp_https_ota): handle ota resumption if server dosent support range requests
This commit added check to see if server supports range requets,
and fallback to OTA without resumption accordingly.

Closes https://github.com/espressif/esp-idf/pull/17960
2026-02-11 14:40:35 +05:30
hrushikesh.bhosale
7787ce77a2 feat(partition_ota): Modified pytest for storage data
- Modified test for storage data, reduced the size to 500 bytes,
less than IMAGE_HEADER_SIZE (1024), to check the workflow, if the
custom partition other than APP and BOOTLOADER less IMAGE_HEADER_SIZE
performed OTA
2026-02-10 13:58:10 +05:30
Sudeep Mohanty
b9c375d09b change(lp_adc): Cleanup LP ADC driver and example 2026-02-09 12:36:04 +01:00
Jiang Jiang Jian
31056d5db9 Merge branch 'refactor/spi_flash_private_v6.0' into 'release/v6.0'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation (v6.0)

See merge request espressif/esp-idf!45488
2026-02-02 10:57:34 +08:00
wuzhenghui
3c44b8fb85 change(esp_hw_support): deprecate esp_deep_sleep_enable_gpio_wakeup API
rename esp_deep_sleep_enable_gpio_wakeup to esp_sleep_enable_gpio_wakeup_on_hp_periph_powerdown
rename esp_deepsleep_gpio_wake_up_mode_t to esp_sleep_gpio_wake_up_mode_t
2026-02-01 12:16:24 +08:00
wuzhenghui
85601ccb69 change(soc): rename peripheral powerdowned sleep wakeable IO soc_caps
rename SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK
rename SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT
rename SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP to SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP
2026-02-01 12:16:20 +08:00
wuzhenghui
2d8c6ed6b4 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2026-01-31 22:31:34 +08:00
Xiao Xufeng
3411286544 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-29 03:28:30 +08:00
Konstantin Kondrashov
ad93238bf1 fix(examples): Use another efuse block for custom efuse table on ESP32H2 2026-01-21 14:38:22 +02:00
Jiang Jiang Jian
798e210531 Merge branch 'fix/task_tracing_crashing_6.0' into 'release/v6.0'
fix(heap): fix a bug where the biggest heap would be NULL on boot (backport 6.0)

See merge request espressif/esp-idf!43447
2026-01-08 20:48:20 +08:00
Li Shuai
bc4d50b42d change(example): sleep iram optimization support for esp_timer demo 2026-01-04 10:43:03 +08:00
Ashish Sharma
76287081ea feat: code cleanup 2025-12-19 07:29:43 +08:00
Ashish Sharma
06d03e1a12 feat: add NVS based secure storage layer for PSA
(cherry picked from commit 31c7bad7f74ce8e54ea0563b670df37a58215600)

Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2025-12-19 07:29:00 +08:00
Ashish Sharma
f306dbea84 feat(mbedtls): migrates ESP-TEE with PSA APIs 2025-12-19 07:28:33 +08:00