Commit Graph

302 Commits

Author SHA1 Message Date
Rahul Tank
e08609e451 fix(nimble): Migrate to NimBLE 1.9.0 2026-07-27 14:14:35 +05:30
harshal.patil
e2c59acc52 test(examples/partitions_ota): handle RSA-less Secure Boot V2 on C2/C61
ESP32-C2 and ESP32-C61 have no RSA based Secure Boot V2 support, so the
CI configs that pin the RSA signing scheme and key fail the app signing
scheme/key check on these targets.

- flash_enc_wifi_2.data_partition_verification: add C2/C61 sdkconfig
  overlays that switch to the ECDSA P-256 signing scheme and key (no
  force-enable needed as Secure Boot V2 itself is not enabled here).
- on_update_no_sb_rsa: disable the build on targets without
  SOC_SECURE_BOOT_V2_RSA, mirroring simple_ota_example, since this
  config specifically exercises the RSA scheme.
2026-07-01 10:54:11 +05:30
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
d8b7df4aa2 fix(examples/partitions_ota): use ECDSA Secure Boot V2 scheme for partitions_ota on C2/C61
ESP32-C2 and ESP32-C61 have no RSA based Secure Boot V2 support
so the virt_sb_v2_and_fe configs cannot use the default RSA signing key.
Add target-specific sdkconfig overlays that switch to the ECDSA P-256 key;
on ESP32-C61 the ECDSA scheme must additionally be force-enabled
SECURE_BOOT_V2_ECDSA_INSECURE).
2026-06-10 15:30:06 +05:30
Konstantin Kondrashov
e8609f59a8 feat(bootloader): Support recovery bootloader for ESP32S31 and ESP32P4 2026-05-08 16:45:14 +03: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
Aditya Patwardhan
80ede37e3a Merge branch 'fix/ota_resumption_ci_failures' into 'master'
fix: solve OTA resumption CI failures

Closes IDFCI-3505 and IDFCI-3328

See merge request espressif/esp-idf!45984
2026-03-30 14:44:14 +05:30
Fu Hanxi
ddc7e0cdf7 ci: move qemu test cli args alongside test scripts
remove redundant host_test marker
2026-03-26 10:56:15 +01:00
nilesh.kale
7647d54271 fix: solve OTA resumption CI failures
This commit started threaded server to serve multiple clients
simultaneouly in individual thread.
2026-03-18 12:16:01 +05:30
Evgeny Torbin
d0f062c018 ci: remove unused test cases 2026-03-12 12:02:10 +01:00
Ashish Sharma
f93575a622 feat(secure_boot): adds api to verify data partition integrity
Closes https://github.com/espressif/esp-idf/issues/17482
2026-03-04 10:22:33 +08:00
Mahavir Jain
3a093f6f11 Merge branch 'feat/spi_mode_during_ota' into 'master'
feat(app_update): add API for checking the spi mode compatibility

See merge request espressif/esp-idf!45221
2026-02-12 13:46:58 +05:30
Mahavir Jain
c60f19c299 Merge branch 'fix/add_check_for_range_request_supported_by_server_during_ota_resumption' into 'master'
fix(esp_https_ota): added a check if range request is supported during OTA resumption is enabled

Closes IDFGH-16894

See merge request espressif/esp-idf!44090
2026-02-10 17:53:04 +05:30
Mahavir Jain
6ee3775e2b tests(ota): fix advanced ota case for matching chip id 2026-02-10 12:53:50 +05:30
hrushikesh.bhosale
a9d94563de 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-09 14:16:24 +05:30
nilesh.kale
ba308b6d76 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-09 13:48:48 +05:30
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
Ashish Sharma
ac79c16f89 feat: migrates system examples to PSA APIs 2025-12-30 09:31:49 +05:30
harshal.patil
60637470c2 test(ota): Add tests for verifying app build's SBv2 ECDSA signature verify APIs 2025-12-23 23:24:46 +05:30
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
nilesh.kale
7c40e5f45b feat: added testcase to check ota resumption if FE is enabled
This commit also added config option to set default buffer size for OTA.
This testcase mainly checks if OTA resumption fails if data written is
not 16 byte aligned when Flash Encryption is enabled.
2025-12-04 10:51:35 +05:30
Tan Yan Quan
f393e3a837 feat(openthread/ota): support esp32h2 for ota examples over thread 2025-11-26 12:02:15 +08:00
glmfe
f398594982 feat(protocol_examples_common): Use Ethernet Init component
- Refactored protocol_examples_common to use ethernet_init component
2025-11-19 15:58:12 +01:00
Fu Hanxi
1e79c69fc4 tests: change wifi tests expect timeout to 60
- wifi_router
- wifi_ap
- wifi_high_traffic
2025-11-03 09:19:02 +08:00
Peter Dragun
e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Ondrej Kosta
d622d4d9ac feat(esp_eth): removed SPI Ethernet and PHY drivers from IDF 2025-09-28 16:19:42 +02:00
Laukik Hase
1ea0fc261d change(nvs_sec_provider): Make the HMAC-based NVS security scheme default for supported SoCs
- When NVS encryption is enabled on SoCs with the HMAC peripheral that have flash encryption
  enabled, the HMAC-based NVS encryption scheme is now selected as default instead of the
  flash encryption-based scheme.
- If your application previously used the flash encryption-based scheme, you need to manually
  configure the NVS encryption scheme to flash encryption from HMAC through ``menuconfig``
  or your project's ``sdkconfig`` (i.e., setting ``CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC=y``).
2025-09-19 10:38:38 +05:30
Peter Dragun
7d19c310c1 Merge branch 'feat/esptool_v5_minimal' into 'master'
Feat: Add minimal esptool v5 support

See merge request espressif/esp-idf!41314
2025-08-25 16:28:51 +08:00
nilesh.kale
7fc57dbef5 fix: ota: increase timeout and remove redundant server restart in tests
This comit updated pytest file in advanced ota example and also updates
timeout for example to avoid recurring timeout errors in CI
2025-08-22 09:40:41 +05:30
Peter Dragun
eba6b814ba feat: Add support for esptool v5 and keep v4 for now 2025-08-21 15:53:39 +02:00
Wang Meng Yang
7cac735da0 Merge branch 'feat/remove_the_deprecated_api_and_parameter' into 'master'
feat(bt): remove the deprecated functions and parameters

Closes BT-4042

See merge request espressif/esp-idf!40435
2025-08-20 19:36:37 +08:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
gongyantao
179a730a03 feat(bt): remove the deprecated functions and parametes 2025-08-19 16:07:05 +08:00
nilesh.kale
2db4bcf87d feat(esp_http_client): move partial download related code under config
This MR added an menuconfig option to enable partial download feature.
2025-08-05 17:38:10 +05:30
nilesh.kale
5cc874068d feat(esp_http_client): added event HTTP_EVENT_ON_STATUS_CODE
This commit added event HTTP_EVENT_ON_STATUS_CODE and
acquire response status code before header or data.
2025-07-08 17:45:18 +05:30
Konstantin Kondrashov
3a7c1a2e74 feat(bootloader): Bootloader OTA update with recovery bootloader feat 2025-06-12 18:47:33 +08:00
Mahavir Jain
a8bf745f23 Merge branch 'feat/adding_different_strategy_to_perform_tls_using_dynamic_feature' into 'master'
Add configuration to control dynamic buffer strategy in mbedtls

Closes IDF-12591

See merge request espressif/esp-idf!39469
2025-06-12 09:52:35 +05:30
Aditya Patwardhan
f4e8813d45 Merge branch 'contrib/github_pr_15972' into 'master'
feat(esp_http_client): Event to signal last header downloaded (GitHub PR)

See merge request espressif/esp-idf!39309
2025-06-10 13:08:10 +05:30
hrushikesh.bhosale
5928a87aa7 feat(mbedtls): Add configuration to control dynamic buffer strategy in mbedtls
Problem:
1. In low-memory scenarios, the dynamic buffer feature can fail due to memory fragmentation.
2. It requires a contiguous 16KB heap chunk, but continuous allocation and deallocation of
the RX buffer can lead to fragmentation.
3. If another component allocates memory between these operations, it can break up the
available 16KB block, causing allocation failure.

Solution:
1. Introduce configurable strategy for using dynamic buffers in TLS connections.
2. For example, convert RX buffers to static after the TLS handshake.
3. Allow users to select the strategy via a new field in the esp_http_client_cfg_t structure.
4. The strategy can be controlled independently for each TLS session.
2025-06-05 12:43:47 +05:30
Richard Allen
30758d9beb feat(esp_http_client): Event to signal last header download
When parsing ND-JSON streams, this is needed to indicate the
point when the ND-JSON stream is considered open, which
occurs just after the last HTTP_EVENT_ON_HEADER.

ND-JSON stream clients cannot rely on the first HTTP_EVENT_ON_DATA,
since that is only triggered by an event, which are optional and
may never be sent, or only sent well after the last HTTP_EVENT_ON_HEADER.

Closes #15952
2025-05-28 08:50:28 -05:00
hrushikesh.bhosale
2c5530528c fix(advanced_ota): Added support for cert bundle in advanced OTA
1. Added support for cert bundle in advanced OTA
2. This allows to easily test example with different public servers
2025-05-27 10:53:19 +05:30
Ashish Sharma
415e0f3c86 feat(mbedtls): add support for dynamic buffer for TLS1.3
Closes https://github.com/espressif/esp-idf/issues/15448
2025-04-24 12:05:36 +08:00
Mahavir Jain
78ef080251 Merge branch 'fix/ota_pytest_idf_path_fix' into 'master'
fix(ota): Fix the pytest's idf_path

See merge request espressif/esp-idf!38321
2025-04-15 17:04:39 +08:00
hrushikesh.bhosale
3e1317fd13 fix(ota): Fix the OTA pytest idf_path
Due to ci/pytest-mark-formatter(branch) fix, while executing the main
function from the pytest, it gives error for the incorrect idf_path.

This commit ensure that, idf_path is fixed correctly.
2025-04-15 11:06:51 +05:30
nilesh.kale
54eb749fd2 feat: updated check for chip revision and respective testcases
This commit have updated check for max chip revision along with min chip revision.
Also added qemu based pytest to verify chip revision while performing OTA.
2025-04-07 18:18:16 +08:00
Chen Jichang
6c4271d4bb feat(esp32h4): disable unsupported build 2025-03-28 14:41:29 +08:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
nilesh.kale
19ea12664d feat: added test for ota resumption through ethernet 2025-03-10 13:32:06 +05:30
Mahavir Jain
843729c6f1 Merge branch 'feature/verify_chip_revision_during_ota' into 'master'
feat(esp_https_ota): added check for revision check while performing OTA

See merge request espressif/esp-idf!37270
2025-03-05 22:29:35 +08:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00