Commit Graph
365 Commits
Author SHA1 Message Date
armando 2cacb0bd56 change(flash): deprecate bootloader_flash_priv.h 2026-09-09 14:17:00 +08:00
armando 6e3abd12a1 refactor(spi_flash): move os layer to esp_mspi and chip configs to spi_flash
Also fixes the implicit dependency on esp_partition.
2026-09-09 14:17:00 +08:00
Martin Vychodil c17ec317ef Merge branch 'feat/generic_partition_bdl_example' into 'master'
feat(storage): Add generic partition BDL example

Closes IDF-15980

See merge request espressif/esp-idf!50305
2026-09-08 21:02:54 +08:00
Adam Múdry 98fee5a68a feat(storage): Add generic partition BDL example
Add an example under examples/storage/generic_partition_bdl that
partitions a raw block device at run time using only the Block Device
Layer (BDL) interface.

The example obtains a whole-disk BDL (SPI flash data partition by
default, or an SD/eMMC card via menuconfig), writes an MBR partition
table onto it with the esp_ext_part_tables managed component (fetched
via idf_component.yml), then creates a generic-partition BDL for each
MBR entry with esp_blockdev_generic_partition_get() and mounts FATFS on
the FAT slice and LittleFS on the LittleFS slice.
2026-09-08 14:38:16 +02:00
Martin Vychodil c505f399a3 Merge branch 'fix/reenable_sdmmc_tests_p4' into 'master'
fix(storage): Re-enable SDMMC related tests for P4

Closes IDF-8970

See merge request espressif/esp-idf!51766
2026-08-31 21:08:27 +08:00
Martin Vychodil 4cce27e1cc Merge branch 'fix/sdmmc_dma_aligned_buffer_leak' into 'master'
fix(sdmmc): release aligned buffer on card deinit

Closes IDF-16031 and DOC-15562

See merge request espressif/esp-idf!51530
2026-08-28 13:57:05 +08:00
Adam Múdry 273953fb64 fix(storage): Re-enable SDMMC related tests for P4 2026-08-27 14:33:37 +02:00
Adam Múdry e0c094da69 fix(sdmmc): release aligned DMA buffer on card deinit 2026-08-27 12:00:24 +02:00
sonika.rathi b38461a0a8 docs(storage): clarify example READMEs and when to use each
Update storage example docs so FATFS getting_started and wear_levelling
are clearly distinct, refresh the storage index paths, and add
"When to use this example" sections across storage examples.
2026-08-19 14:54:49 +02:00
radek.tandler c6c0734a7b docs(nvs_flash): improved example of NVS fragmentation 2026-08-03 11:39:48 +08:00
radek.tandler 56a01ca822 docs(nvs_flash): improved description of NVS space consumption
- Improved description of space required to store data types into NVS partition
  - Example showing nvs statistics extended with a code demonstrating the fragmentation effect
2026-08-03 11:39:47 +08:00
Martin Vychodil e85b99fc49 Merge branch 'bugfix/idfci-12815-12072-timeout' into 'master'
fix(storage): mark storage pytest apps flaky in CI

Closes IDFCI-12815, IDFCI-12072, IDFCI-8841, IDFCI-12712, IDFCI-13218, IDFCI-12926, and IDFCI-12875

See merge request espressif/esp-idf!51018
2026-07-31 14:02:49 +08:00
sonika.rathi fe328c0ac7 fix(storage): mark storage pytest apps flaky in CI 2026-07-30 10:55:50 +02:00
sonika.rathi ab894caac3 fix(nvs_console): use esp_stdio for console peripheral init 2026-07-27 14:16:13 +02:00
Sonika Rathi 69550b17c8 Merge branch 'bugfix/parttool-serial-handoff' into 'master'
fix(storage): stabilize parttool pytest serial handoff

Closes IDFCI-3899

See merge request espressif/esp-idf!50444
2026-07-17 19:04:06 +08:00
sonika.rathi 4af379dcad fix(fatfs): erase storage partition before bdl_wl CI test 2026-07-07 11:42:08 +02:00
sonika.rathi 1fe9c8ad62 fix(storage): stabilize parttool pytest serial handoff 2026-07-07 09:41:10 +02:00
Michael (XIAO Xufeng) c1b218b640 Merge branch 'fix/mmap_cache_flash_wr' into 'master'
fix(mmap): fixed mmap read data wrong when flash being erased/written and cache not disabled

Closes IDFGH-14084

See merge request espressif/esp-idf!29804
2026-06-29 11:44:10 +08:00
71e057cfca docs(jtag-debugging): add semihosting chapter
Co-authored-by: Shen Mengjing <shenmengjing@espressif.com>
Co-authored-by: Zhang Shu Xian <zhangshuxian@espressif.com>
2026-06-22 12:55:06 +02: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
Song Ruo Jing 545b31e6b9 feat(spi_flash): Add exclusive support for ESP32H4
Add 32bit addr support for esp32s31 as well
2026-06-08 17:56:09 +08:00
C.S.M e36b9436b9 feat(spi_flash): Add entire support for h21 external flash 2026-06-02 10:41:02 +08:00
Jiang Jiang Jian 90ec41a9f7 Merge branch 'feat/support_rom_psa_mbedtls' into 'master'
feat(mbedtls): enable ESP32-C2(Rev2.0) ROM mbedTLS crypto for PSA

Closes IDF-15012

See merge request espressif/esp-idf!48211
2026-05-22 11:24:42 +08:00
Martin Vychodil 27c99337a3 Merge branch 'bugfix/nvs-bootloader-pytest-app-log' into 'master'
test(nvs_bootloader): mark nvs bootloader pytest as flaky

Closes IDFCI-6610 and IDFCI-10466

See merge request espressif/esp-idf!48176
2026-05-21 20:07:32 +08:00
Martin Vychodil f79c425df1 Merge branch 'bugfix/perf-benchmark-spiflash-ci-idfci-8082' into 'master'
fix(examples): suppress perf_benchmark printf in CI

Closes IDFCI-8082

See merge request espressif/esp-idf!48630
2026-05-21 20:00:42 +08:00
armando f408e1a8bc feat(sdmmc): add esp32s31 support
Enable SDMMC host support on ESP32-S31 across HAL, SOC caps, tests, examples, and documentation.
2026-05-21 09:09:28 +08:00
Jiang Guang Ming d5a712f1f8 feat(mbedtls): enable ROM mbedTLS pytest with esp32c2 rev2.0 2026-05-20 14:15:19 +08:00
sonika.rathi 67ce49943b test(nvs_bootloader): mark nvs bootloader pytest as flaky 2026-05-19 11:49:09 +02:00
sonika.rathi 61f8db0179 fix(examples): suppress perf_benchmark printf in CI 2026-05-18 09:41:58 +02:00
Martin Vychodil 0841f2b458 Merge branch 'bugfix/nvs-rw-value-pytest-idfci-4027' into 'master'
fix(examples): add flaky reruns to nvs_rw_value pytest for CI flash

Closes IDFCI-4027, IDFCI-4463, and IDFCI-8653

See merge request espressif/esp-idf!48150
2026-05-13 19:30:56 +08:00
Sonika Rathi e8bd946be6 Merge branch 'bugfix/perf-benchmark-spiflash-ci-idfci-7684' into 'master'
fix(examples): stabilize perf_benchmark SPI flash CI test

Closes IDFCI-7684, IDFCI-4226, IDFCI-4243, IDFCI-4379, IDFCI-7564, and IDFCI-8082

See merge request espressif/esp-idf!48092
2026-05-13 16:28:04 +08:00
Chen Jichang 3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
sonika.rathi 7abab6e44b fix(examples): rerun flaky perf benchmark spiflash test 2026-05-07 11:40:00 +02:00
sonika.rathi b92e141d5a fix(examples): add flaky reruns to nvs_rw_value pytest for CI flash 2026-05-05 18:38:37 +02:00
Martin Vychodil f70550f51f Merge branch 'bugfix/spiffs-example-pytest-timeout-idfci-10763' into 'master'
fix(examples): extend SPIFFS example pytest timeout for slow CI format

Closes IDFCI-10763

See merge request espressif/esp-idf!48080
2026-05-05 16:00:40 +08:00
sonika.rathi e91cfc554d fix(examples): extend SPIFFS example pytest timeout for slow CI format 2026-04-29 12:37:54 +02:00
sonika.rathi 208436a917 fix(nvs_flash): Skip nvs bootloader CI on ESP32-S31 bringup 2026-04-28 10:41:27 +02:00
Tomas Rohlinek c225eb59db Merge branch 'feat/update_littlefs' into 'master'
feat(storage/littlefs): Bump version to enable blockdev support

Closes IDF-12746

See merge request espressif/esp-idf!47358
2026-04-22 09:51:20 +02:00
Adam Múdry b29b9dc4d2 Merge branch 'feat/cmake_add_partition_flash_binary_function' into 'master'
feat(esp_partition): Add esp_partition_register_target Cmake function

Closes IDF-11870 and DOC-14244

See merge request espressif/esp-idf!37176
2026-04-13 15:54:27 +02:00
Adam Múdry 749c446a7e 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-04-10 15:22:50 +02:00
wanckl 99bf74f022 feat(driver_spi): s31 gpspi driver support 2026-04-10 14:22:17 +08:00
Tomáš Rohlínek c54c523674 feat(storage/littlefs): Bump version to enable blockdev support 2026-04-08 09:45:12 +02:00
Martin Vychodil 7043fb0d14 feat(fatfs): Added BDL support to FatFS component 2026-04-07 07:11:21 +02:00
C.S.M 152b5ccb4c ci(esp32s31): Add ci target test for esp32s31 2026-04-03 11:38:45 +08:00
Adam Múdry 653cea9c94 fix(sdmmc): Multi-block read/writes support refactor + tests and documentation added 2026-03-16 13:33:03 +01:00
Tomáš Rohlínek 4575ac1f5e feat(storage): Minimize dependencies for test cases 2026-02-18 13:43:27 +01:00
Xiao Xufeng 4a4cdf8b22 test(spi_flash): re-enable custom_flash_driver example build test 2026-02-02 19:52:38 +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
igor.udot 4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +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