Commit Graph
981 Commits
Author SHA1 Message Date
Adam Múdry 109cd54902 feat(esp_partition): Add esp_partition_flash_binary() CMake function
Add a new CMake function esp_partition_flash_binary() that provides a
unified API for registering partition data binaries to be flashed. It
replaces the direct esptool_py_flash_target calls scattered across
components (spiffs, fatfs, nvs_flash) with a single function that:

- Resolves partition offset from the partition table automatically
- Determines encryption requirements (auto-detect or ALWAYS_PLAINTEXT)
- Creates per-partition flash targets (e.g. idf.py <partition>-flash)
- Optionally includes the binary in `idf.py flash` via FLASH_IN_PROJECT

On the linux target, the function registers binaries for pre-loading
into the emulated flash. A build-time manifest (linux_flash_data.txt)
is generated via file(GENERATE), and partition_linux.c reads it at
runtime to copy each binary into the memory-mapped flash buffer at
the correct offset.

The partition_ops example is updated to use the new function and
includes a custom_partition with pre-built data to demonstrate the
full workflow, including on the linux target.
2026-08-06 14:35:47 +02:00
Konstantin Kondrashov 666dc3b438 fix(bootloader): increase partition table offset for ESP32-P4 in affected test configs 2026-07-21 13:35:35 +03:00
Alexey Gerenkov c0992a3a5a Merge branch 'sysview_test_fixes_v6.0' into 'release/v6.0'
Sysview test fixes v6.0

See merge request espressif/esp-idf!50729
2026-07-20 18:45:30 +08:00
morris 4edbc85a4a Merge branch 'bugfix/uart_sw_flow_ctrl_xoff_char_v6.0' into 'release/v6.0'
fix(uart): fix uart sw flow ctrl XOFF char write to wrong reg on ESP32C6 (v6.0)

See merge request espressif/esp-idf!50524
2026-07-15 11:52:07 +08:00
Erhan Kurubas f5cca63bb0 test(usb_serial_jtag): pin console uart to ttyUSBx port 2026-07-14 12:15:35 +02:00
Chen ChenandCursor 269d582181 fix: update flash encryption mock build check
Use a non-deprecated bootloader support API in the mock build test.
Keep the test focused on validating the generated bootloader support mock.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 17:30:39 +08:00
Song Ruo Jing b5e03248bb fix(stdio): add console input ability when selects ESP_CONSOLE_UART_CUSTOM_NUM_1 2026-07-09 19:24:07 +08:00
Erhan Kurubas 737f1f3a38 test(espcoredump): run test_tcb_corrupted with custom stack 2026-07-08 08:47:26 +02:00
harshal.patil d11534bfa1 fix(panic): handle absent IROM/DROM alignment gap in spiram-xip memprot tests
The spiram-xip IROM/DROM alignment tests assumed the XIP region always
leaves an alignment gap before the next MMU page: they executed into the
gap and expected an instruction access fault followed by a register dump.
When the section ends exactly on an MMU page boundary there is no gap - the
device prints "<IROM/DROM> alignment gap not added into heap" and returns,
the framework restarts cleanly (esp_restart_noos, no panic), and the test
timed out waiting for a register dump.
2026-07-01 11:00:05 +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
Mahavir Jain 36f3329a23 Merge branch 'feature/recovery_bootloader_support_v6.0' into 'release/v6.0'
feat(bootloader): Support recovery bootloader for ESP32P4 (v6.0)

See merge request espressif/esp-idf!48468
2026-05-15 09:52:49 +05:30
Konstantin Kondrashov 2fcf83e2f3 fix(test_apps): Increase CONFIG_PARTITION_TABLE_OFFSET to 0x9000
Fix some test apps that have a partition table offset of 0x8000,
which left no room for the bootloader for some chips.
2026-05-13 10:18:40 +03:00
yinqingzhao 1dd3147edf fix(test_apps): fix bugs in phy tsens test apps 2026-05-13 10:03:00 +08:00
Aditya Patwardhan 58ae4daa56 Merge branch 'fix/pmp_drom_mask_read_only_v6.0' into 'release/v6.0'
fix(cpu_region_protect): set DROM mask PMP entry to read-only (v6.0)

See merge request espressif/esp-idf!47575
2026-05-12 16:15:49 +05:30
nilesh.kale 2a0e25ab74 fix(cpu_region_protect): set DROM mask PMP entry to read-only
PMP entry 3 (SOC_DROM_MASK_HIGH, TOR mode) in the memprot path
was incorrectly granted RW permission on esp32h21 and esp32c61.
The mask ROM data region is inherently read-only; remove the W bit.

Also added necessary tests to check voilations and re-enabled
tests for ESP32P4
2026-05-11 10:15:39 +05:30
Ashish Sharma 04ec0ab538 feat(bootloader_support): remove P192 curve support 2026-05-10 19:16:12 +08:00
Jiang Jiang Jian 3d2c10aaf3 Merge branch 'feat/coredump_rtc_noinit_v6.0' into 'release/v6.0'
Add a new attribute COREDUMP_NOINIT_ATTR (v6.0)

See merge request espressif/esp-idf!45054
2026-05-06 10:19:37 +08:00
sonika.rathi 9dc6ec1eb3 fix(fatfsgen): stabilize host read-flash after UART close in pytest 2026-04-30 14:36:21 +02:00
Marius Vikhammer dcb68bf51a Merge branch 'ci/panic_tests_p4_s31_v6.0' into 'release/v6.0'
test(system): enable panic tests for P4 and S31 (v6.0)

See merge request espressif/esp-idf!47461
2026-04-28 09:02:20 +08:00
Erhan Kurubas 09831a5911 feat(coredump): add coredump_noinit attribute 2026-04-13 17:41:31 +08:00
Marius Vikhammer ffb4b70b18 test(system): enable panic tests for P4 2026-04-10 15:38:18 +08:00
Fu Hanxi ad1d17a794 ci: rename eco tags to revision 2026-04-09 10:43:34 +02:00
Jiang Jiang Jian 94ace905b9 Merge branch 'feature/update_gdbstub_v6.0' into 'release/v6.0'
gdbstub: backport fixes (v6.0)

See merge request espressif/esp-idf!46200
2026-03-24 10:28:23 +08:00
igor.udot e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Jiang Jiang Jian 7a9362c9c8 Merge branch 'fix/cmake_flags_passing_to_external_project_v6.0' into 'release/v6.0'
fix(build): fix passing CMAKE_<LANG>_FLAGS from ExternalProject_Add (v6.0)

See merge request espressif/esp-idf!46651
2026-03-20 10:47:26 +08:00
Jiang Jiang Jian 6c1ab48431 Merge branch 'fix/coredump_test_tcb_corrupted_v6.0' into 'release/v6.0'
test(espcoredump): fix test for corrupted TCB handling in coredump (v6.0)

See merge request espressif/esp-idf!44834
2026-03-20 10:21:26 +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
Alexey Lapshin c089650ec7 fix(build): fix passing CMAKE_<LANG>_FLAGS from ExternalProject_Add 2026-03-16 15:19:35 +07:00
Evgeny Torbin 0070b687b5 ci: remove unused test cases 2026-03-12 12:34:23 +01:00
Alexey Lapshin 6019f9689a feat(esp_gdbstub): support watchpoint trigger reason 2026-03-12 17:24:26 +07:00
Alexey Lapshin f40dc50300 fix(gdbstub): fix task lookup by frame 2026-03-12 17:24:26 +07:00
Alexey Lapshin 2179c8afef fix(gdbstub): xtensa: fix FPU registers read and write
Closes https://github.com/espressif/esp-idf/issues/17944
2026-03-12 17:24:26 +07:00
Chen Jichang 04df934c05 refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component 2026-03-06 18:14:22 +08:00
Chen Jichang fea2c08655 test(parlio,rmt,lcd): add virtual flash encryption test 2026-03-06 18:14:22 +08: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
Song Ruo Jing 89da3742b8 refactor(clk): split clock HAL into separate component 2026-01-31 22:32:37 +08:00
wuzhenghui 12b9fb6549 feat(esp_hal_rtc_timer): introduce new RTC timer component and refactor existing timer functions 2026-01-31 22:29:20 +08:00
Aditya Patwardhan 4d3cfefc2e refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-30 17:12:54 +05:30
Jiang Jiang Jian 770f393855 Merge branch 'coredump_read_flash_retry_v6.0' into 'release/v6.0'
Add retry logic to espcoredump subprocess call (v6.0)

See merge request espressif/esp-idf!45317
2026-01-30 14:31:27 +08:00
morris db750dc1a0 feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma 2026-01-29 14:41:14 +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
Jiang Jiang Jian 2359d58fbf Merge branch 'refactor/independent_esp_hal_pmu_v6.0' into 'release/v6.0'
feat(hal): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu (v6.0)

See merge request espressif/esp-idf!44954
2026-01-28 19:02:36 +08:00
Erhan Kurubas c718482e9a test(panic): add retry logic to espcoredump subprocess call 2026-01-21 00:17:39 +03:00
wuzhenghui de5e57d296 feat(esp_hal_pmu): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu 2026-01-12 14:48:49 +08:00
yinqingzhao 7089093fde test(system): add esp32c61 eco4 build test 2026-01-10 13:23:59 +08:00
wanglei b946312646 test(system): add esp32c5 eco3 build test 2026-01-10 13:22:20 +08:00
Jiang Jiang Jian 8d0fc97530 Merge branch 'bugfix/idfgh-16634_v6.0' into 'release/v6.0'
backport v6.0: remove the configurable constraint for sleep memory usage optimization option

See merge request espressif/esp-idf!44754
2026-01-08 13:49:39 +08:00
Erhan Kurubas 10cffdfbd5 test(espcoredump): fix test for corrupted TCB handling in coredump 2026-01-06 15:17:51 +03:00
Erhan Kurubas ffe245e917 test(panic): improve stack dump capture to return full hex content 2026-01-06 15:13:20 +03:00
Song Ruo Jing ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00