mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
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.
This commit is contained in:
@@ -157,6 +157,11 @@
|
||||
|
||||
.. _blockdev-apis:
|
||||
|
||||
应用示例
|
||||
--------
|
||||
|
||||
- :example:`storage/generic_partition_bdl` 演示了如何仅使用块设备层在运行时对裸块设备进行分区:将 MBR 分区表写入整盘 BDL(SPI flash 数据分区或 SD/eMMC 卡),并在通用分区 BDL 切片上挂载 FATFS 和 LittleFS。
|
||||
|
||||
API 参考
|
||||
--------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user