2023-04-18 08:46:20 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
2019-08-18 01:27:09 -04:00
|
|
|
set(srcs "diskio/diskio.c"
|
2023-04-18 08:46:20 -04:00
|
|
|
"diskio/diskio_rawflash.c"
|
|
|
|
"diskio/diskio_wl.c"
|
|
|
|
"src/ff.c"
|
|
|
|
"src/ffunicode.c")
|
|
|
|
|
|
|
|
set(include_dirs "diskio" "src")
|
|
|
|
|
|
|
|
set(requires "wear_levelling")
|
|
|
|
|
|
|
|
# for linux, we do not have support for vfs and sdmmc, for real targets, add respective sources
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
list(APPEND srcs "port/linux/ffsystem.c")
|
|
|
|
else()
|
|
|
|
list(APPEND srcs "port/freertos/ffsystem.c"
|
|
|
|
"diskio/diskio_sdmmc.c"
|
|
|
|
"vfs/vfs_fat.c"
|
|
|
|
"vfs/vfs_fat_sdmmc.c"
|
|
|
|
"vfs/vfs_fat_spiflash.c")
|
|
|
|
|
|
|
|
list(APPEND include_dirs "vfs")
|
|
|
|
|
2023-11-16 02:17:04 -05:00
|
|
|
list(APPEND requires "sdmmc" "esp_driver_sdmmc" "esp_driver_sdspi")
|
2023-04-18 08:46:20 -04:00
|
|
|
|
2023-10-17 00:11:42 -04:00
|
|
|
list(APPEND priv_requires "vfs" "esp_driver_gpio")
|
2023-04-18 08:46:20 -04:00
|
|
|
endif()
|
2019-08-18 01:27:09 -04:00
|
|
|
|
|
|
|
idf_component_register(SRCS ${srcs}
|
2023-04-18 08:46:20 -04:00
|
|
|
INCLUDE_DIRS ${include_dirs}
|
|
|
|
REQUIRES ${requires}
|
|
|
|
PRIV_REQUIRES ${priv_requires}
|
2019-08-18 01:27:09 -04:00
|
|
|
)
|