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)
|
2018-02-27 04:45:30 +00:00
|
|
|
# Bootloader needs SPIUnlock from this file, but doesn't
|
|
|
|
# need other parts of this component
|
2019-04-28 07:38:23 +00:00
|
|
|
set(srcs "spi_flash_rom_patch.c")
|
2018-01-12 02:49:13 +00:00
|
|
|
else()
|
2019-09-10 06:34:06 +00:00
|
|
|
set(srcs
|
2019-06-21 06:29:32 +00:00
|
|
|
"cache_utils.c"
|
|
|
|
"flash_mmap.c"
|
|
|
|
"flash_ops.c"
|
|
|
|
"partition.c"
|
|
|
|
"spi_flash_rom_patch.c"
|
2019-09-10 06:34:06 +00:00
|
|
|
)
|
|
|
|
# New implementation
|
|
|
|
list(APPEND srcs
|
2019-06-21 06:29:32 +00:00
|
|
|
"spi_flash_chip_drivers.c"
|
|
|
|
"spi_flash_chip_generic.c"
|
|
|
|
"spi_flash_chip_issi.c"
|
|
|
|
"spi_flash_os_func_app.c"
|
|
|
|
"spi_flash_os_func_noos.c"
|
2019-09-10 06:34:06 +00:00
|
|
|
"memspi_host_driver.c"
|
|
|
|
"esp_flash_api.c"
|
|
|
|
"esp_flash_spi_init.c"
|
|
|
|
)
|
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-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)
|