2021-07-02 04:27:09 +00:00
|
|
|
# NOTE: This kind of mocking currently works on Linux targets only.
|
|
|
|
# On Espressif chips, too many dependencies are missing at the moment.
|
|
|
|
# Furthermore, this component can only mock the interfaces of
|
|
|
|
# spi_master.h and gpio.h.
|
2022-10-14 12:15:32 +00:00
|
|
|
message(STATUS "building SPI FLASH MOCKS (only esp_partition support)")
|
2021-07-02 04:27:09 +00:00
|
|
|
|
|
|
|
idf_component_get_property(original_spi_flash_dir spi_flash COMPONENT_OVERRIDEN_DIR)
|
|
|
|
|
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
|
|
|
set(include_dirs
|
|
|
|
"${original_spi_flash_dir}/include")
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
list(APPEND include_dirs
|
|
|
|
"${original_spi_flash_dir}/sim/stubs/soc/include")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
idf_component_mock(INCLUDE_DIRS ${include_dirs}
|
|
|
|
REQUIRES esp_common
|
|
|
|
MOCK_HEADER_FILES
|
|
|
|
${original_spi_flash_dir}/include/esp_flash.h
|
2022-06-27 07:24:07 +00:00
|
|
|
${original_spi_flash_dir}/include/spi_flash_mmap.h)
|