23 Commits

Author SHA1 Message Date
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
sonika.rathi 6216b017f0 feat(vfs): add 'fatfs' host test to include 'vfs' support 2025-11-05 09:49:21 +01:00
Konstantin Kondrashov b7da740f12 Merge branch 'feature/log_v2_optimization' into 'master'
feat(log): Optimize idf components for binary logging

Closes IDF-12775

See merge request espressif/esp-idf!40289
2025-09-19 14:45:43 +08:00
sonika.rathi 2fa2010aa4 feat(esp_partition): add support for partition tables larger than 4MB with linux target 2025-09-16 22:23:06 +08:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Konstantin Kondrashov 52f14f344d feat(partition_table): Support recovery bootloader subtype 2024-11-12 17:22:53 +08:00
Konstantin Kondrashov d5f37b526d feat(partitions): Adds new partition types and subtypes for bootloader and partition_table 2024-10-01 14:22:22 +03:00
Sonika Rathi d5da858cd9 refactor: remove dependency on spi_flash include for sector size 2024-09-26 13:01:24 +08:00
Konstantin Kondrashov 0bdf675992 fix(linux): Fix warnings for Linux target when COMPILER_STATIC_ANALYZER=y 2024-07-31 11:23:54 +03:00
Tomáš Rohlínek f753434640 fix(storage/esp_partition): add option to control erase check during write for linux target 2024-05-28 10:05:58 +02:00
Ivan Grokhotkov 10cc15b150 fix(storage): applied spelling fixes by codespell pre-commit hook 2024-03-28 13:00:54 +01:00
Jakob Hasse 4d629be602 refactor(linux): Unified libbsd handling
* Users can now use libbsd string.h and sys/cdefs.h functionality
  (e.g., strlcpy, containerof) on Linux by just including
  string.h or sys/cdefs.h. In other words, the includes are the same
  on the Linux target as well as on chips targets (ESP32, etc.).
* libbsd linking is done by the linux component (belongs to common
  components) now instead of handling it separately in each component
2024-03-08 12:26:54 +08:00
Adam Múdry 0cc38fb901 refactor(esp_partition): Expose function for unloading partitions
Closes https://github.com/espressif/esp-idf/issues/12625
2023-11-22 11:13:32 +01:00
Adam Múdry e151184da7 refactor: Remove -Wno-format from storage related components 2023-10-22 17:56:41 +00:00
Adam Múdry ab1eb37fe8 feat(partition_table): Add read-only partition flag and functionality 2023-10-11 00:01:05 +02:00
radek.tandler 28f82d8de7 refactor(nvs_flash): Host test migrated to esp_partition emulation for linux 2023-08-09 14:14:21 +02:00
radek.tandler 4c13bf53ea change(esp_partition): Improved granularity of power-off emulation for Linux 2023-08-09 14:14:14 +02:00
Jakob Hasse f67bcc669a esp_partition: partition_linux.c and its test do not use hard-coded file anymore 2023-03-31 15:07:07 +08:00
Martin Vychodil abc4d67a9d Storage: Fixed formatting of esp_partition Linux code 2023-03-03 23:57:34 +00:00
radek.tandler e9e388a085 Storage: ESP Partition extended options for the SPI Flash emulation
Various extensions and fixes to improve Linux target SPI Flash emulation. Used by the host tests
2023-03-03 23:57:34 +00:00
Jakob Hasse 9991862a10 fix(linux): fix build errors and warnings, remove ignore file 2023-01-18 09:24:28 +08:00
radek.tandler 9e191bad52 esp_partition/linux target: Add functions supporting host tests
Added statistics and wear simulation functions to support migration of
remaining storage related host tests from fixture to linux implementation
of esp_partition.
2023-01-10 14:10:14 +01:00
Martin Vychodil c9c7573f71 Storage: Partition APIs moved to the new component 'esp_partition'
All the partition handling API functions and data-types were moved from the 'spi_flash' component to the new one named 'esp_partition'. See Storage 5.x migration guide for more details
2022-11-02 21:54:45 +01:00