2019-04-28 07:38:23 +00:00
|
|
|
set(priv_requires bootloader_support soc)
|
2018-01-12 02:49:13 +00:00
|
|
|
if(BOOTLOADER_BUILD)
|
2019-08-08 03:44:24 +00:00
|
|
|
# on ESP32, we will include spi_flash_rom_patch.c
|
|
|
|
# but on other platforms no source files are needed for bootloader
|
|
|
|
set(srcs)
|
2018-01-12 02:49:13 +00:00
|
|
|
else()
|
2019-06-21 06:29:32 +00:00
|
|
|
set(srcs
|
|
|
|
"cache_utils.c"
|
|
|
|
"flash_mmap.c"
|
|
|
|
"flash_ops.c"
|
|
|
|
"partition.c"
|
|
|
|
"spi_flash_chip_drivers.c"
|
|
|
|
"spi_flash_chip_generic.c"
|
|
|
|
"spi_flash_chip_issi.c"
|
2019-08-08 04:00:45 +00:00
|
|
|
)
|
2019-08-08 05:28:10 +00:00
|
|
|
if (NOT CONFIG_IDF_TARGET_ESP32S2BETA)
|
|
|
|
# TODO: workaround until ESP32-S2 supports new API, can be always included
|
|
|
|
list(APPEND srcs "esp_flash_spi_init.c"
|
2019-08-08 04:00:45 +00:00
|
|
|
"memspi_host_driver.c"
|
|
|
|
"spi_flash_os_func_app.c"
|
2019-08-08 05:28:10 +00:00
|
|
|
"spi_flash_os_func_noos.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT CONFIG_SPI_FLASH_USE_LEGACY_IMPL)
|
|
|
|
list(APPEND srcs "esp_flash_api.c")
|
2019-05-27 06:29:43 +00:00
|
|
|
endif()
|
2019-04-28 07:38:23 +00:00
|
|
|
set(priv_requires bootloader_support app_update soc)
|
2018-01-12 02:49:13 +00:00
|
|
|
endif()
|
|
|
|
|
2019-08-08 03:44:24 +00:00
|
|
|
if(CONFIG_IDF_TARGET_ESP32)
|
|
|
|
list(APPEND srcs "spi_flash_rom_patch.c")
|
|
|
|
endif()
|
|
|
|
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
PRIV_REQUIRES "${priv_requires}"
|
|
|
|
INCLUDE_DIRS include
|
|
|
|
PRIV_INCLUDE_DIRS private_include
|
|
|
|
LDFRAGMENTS linker.lf)
|
2018-04-18 02:57:45 +00:00
|
|
|
|