diff --git a/targets/ESP32/CMakeLists.txt b/targets/ESP32/CMakeLists.txt index 435ba43c50..25e90e0454 100644 --- a/targets/ESP32/CMakeLists.txt +++ b/targets/ESP32/CMakeLists.txt @@ -99,6 +99,11 @@ if(NF_FEATURE_HAS_SDCARD) execute_process( COMMAND ${CMAKE_COMMAND} -E remove ${esp32_idf_SOURCE_DIR}/components/fatfs/src/ffconf.h ) +else() + # if not using FatFS need to check if IDF ffconfig.h exists + if(NOT(IS_ABSOLUTE ${esp32_idf_SOURCE_DIR}/components/fatfs/src/ffconf.h)) + message(FATAL_ERROR "'${esp32_idf_SOURCE_DIR}/components/fatfs/src/ffconf.h' file is missing from IDF\rIf this was deleted on a previous build using SDCard, just revert the change and restore the file.") + endif() endif() # target folder was added in main CMakeList diff --git a/targets/ESP32/ESP32_S2/ffconf.h b/targets/ESP32/ESP32_S2/ffconf.h index aaf7d49a53..0dbd625ead 100644 --- a/targets/ESP32/ESP32_S2/ffconf.h +++ b/targets/ESP32/ESP32_S2/ffconf.h @@ -14,7 +14,7 @@ // need this include here when not using SDCARD so it can load the one from IDF #include #endif - + /*---------------------------------------------------------------------------/ / FatFs Functional Configurations /---------------------------------------------------------------------------*/