mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
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.
9 lines
398 B
Plaintext
9 lines
398 B
Plaintext
CONFIG_PARTITION_TABLE_CUSTOM=y
|
|
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv"
|
|
CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv"
|
|
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
|
# FATFS
|
|
# CONFIG_FATFS_SECTOR_* only selects the sector size for host-generated FAT images.
|
|
# This example formats at run time using the sector size derived from BDL geometry.
|
|
CONFIG_FATFS_VFS_FSTAT_BLKSIZE=4096
|