Compiling Amazon FreeRTOS give me "include could not find load file: ..."

netstv wrote on November 15, 2019:

Building Machine:
MacBook Pro
Catalina
OSX 10.15.1

I’ve gone through the “Getting Started with the Espressif ESP32-DevKitC and the ESP-WROVER-KIT” to configure the FreeRTOS demo applications. Did the AWS Command Line Interface, ran the configure (set my ssid, wifi, thing name,etc…)

Run the python SetupAWS.py setup with no errors.
Then I run
cmake -DVENDOR=espressif -DBOARD=esp32_wrover_kit -DCOMPILER=xtensa-esp32 -S . -B build

Then I change directories to the build directory…
make all -j4

Here is the console output that fails and I need help on…

start of console output
Scanning dependencies of target bootloader
[ 48%] Creating directories for ‘bootloader’
[ 48%] Building ASM object esp-idf/esp32/CMakeFiles/idf_component_esp32.dir/dport_panic_highint_hdl.S.obj
[ 48%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/ctr_drbg.c.obj
[ 48%] Building C object esp-idf/esp32/CMakeFiles/idf_component_esp32.dir/esp_err_to_name.c.obj
[ 50%] No download step for ‘bootloader’
[ 50%] No patch step for ‘bootloader’
[ 50%] No update step for ‘bootloader’
[ 50%] Building C object esp-idf/nimble/CMakeFiles/idf_component_nimble.dir/nimble/nimble/host/src/ble_l2cap_coc.c.obj
[ 51%] Building C object esp-idf/esp32/CMakeFiles/idf_component_esp32.dir/esp_timer.c.obj
[ 51%] Performing configure step for ‘bootloader’
[ 51%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/debug.c.obj
CMake Error at /Users/stepheniribarne/work/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:24 (include):
include could not find load file:

components

Call Stack (most recent call first):
/Users/stepheniribarne/work/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/project.cmake:5 (include)
CMakeLists.txt:19 (include)

[ 51%] Building C object libraries/3rdparty/CMakeFiles/afr_3rdparty_mbedtls.dir/mbedtls/library/des.c.obj
– Found Git: /usr/local/bin/git (found version “2.23.0”)
CMake Error at /Users/stepheniribarne/work/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:42 (idf_set_target):
Unknown CMake command “idf_set_target”.
Call Stack (most recent call first):
/Users/stepheniribarne/work/amazon-freertos/vendors/espressif/esp-idf/tools/cmake/project.cmake:5 (include)
CMakeLists.txt:19 (include)

– Configuring incomplete, errors occurred!
make[2]: *** [esp-idf/bootloader-prefix/src/bootloader-stamp/bootloader-configure] Error 1
make[1]: *** [esp-idf/CMakeFiles/bootloader.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…

end of console output

I don’t know what I’m missing. I followed the instructions (multiple times) very closely. I don’t know how to debug this. Any help would be greatly appreciated.

-stv

Carl-Lundin-AWS wrote on November 18, 2019:

hello netstv,

Could you describe what version of Amazon FreeRTOS you are using, as well as what version of CMAKE, IDF, and Xtensa you are using?

ShaunHusainBuild wrote on November 21, 2019:

I ran into the same issue turns out mine was because of having installed esp-idf from their main github repo instead of using the one bundled with FreeRTOS. Once I went in and removed my IDF_PATH set in my .profile as part of the ESP tools setup then was able to compile and flash. For some reason I can’t find the serial port selection when running idf.py menuconfig but am able to specify it with -p when using idf.py at the command line so able to work around that but sort of annoying. Anyway super glad to have it compiling and flashing at this point, next step is to try out the OTA update process and see how that goes.