nkolban / esp32-snippets

Sample ESP32 snippets and code fragments
https://leanpub.com/kolban-ESP32
Apache License 2.0
2.35k stars 710 forks source link

ninja: error: rebuilding 'build.ninja': subcommand failed #1038

Open aledoors opened 3 years ago

aledoors commented 3 years ago

I get the following error when I try to flash the program into the microcontroller. The compilation is done without problems. Does anyone know what I'm doing wrong?

CMake Error at C:/esp-idf/tools/cmake/component.cmake:302 (message): Include directory 'D:/Eclipse/Trabajo/ESP32_oled_i2c_u8g2/main/csrc' is not a directory. Call Stack (most recent call first): C:/esp-idf/tools/cmake/component.cmake:470 (__component_add_include_dirs) C:/esp-idf/tools/cmake/component.cmake:531 (idf_component_register) main/CMakeLists.txt:92 (register_component)

-- Configuring incomplete, errors occurred! See also "D:/Eclipse/Trabajo/ESP32_oled_i2c_u8g2/build/CMakeFiles/CMakeOutput.log". FAILED: build.ninja C:\Users\Alejandro.espressif\tools\cmake\3.13.4\bin\cmake.exe -SD:\Eclipse\Trabajo\ESP32_oled_i2c_u8g2 -BD:\Eclipse\Trabajo\ESP32_oled_i2c_u8g2\build ninja: error: rebuilding 'build.ninja': subcommand failed Adding "flash"'s dependency "all" to list of commands with default set of options. Executing action: all (aliases: build) Running ninja in directory d:\eclipse\trabajo\esp32_oled_i2c_u8g2\build Executing "ninja all"... ninja failed with exit code 1

Thanks in advance

aledoors commented 3 years ago

Modify some things and now the error I get is the following:

[2/6] cmd.exe /C "cd /D D:\Eclipse\Trabajo\ESP32_oled_i2c_u8g2\build\bootloader && C:\Users\Alejandro.espressif\tools\cmake\3.13.4\bin\cmake.exe --build ." ninja: no work to do. [3/4] cmd.exe /C "cd . && C:\Users\Alejandro.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\app-template.elf.rsp -o app-template.elf && cd ." FAILED: app-template.elf cmd.exe /C "cd . && C:\Users\Alejandro.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\app-template.elf.rsp -o app-template.elf && cd ." c:/users/alejandro/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x10): undefined reference to app_main' c:/users/alejandro/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in functionmain_task': C:/esp-idf/components/esp32/cpu_start.c:544: undefined reference to `app_main' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Build complete (3 errors, 0 warnings): D:\Eclipse\Trabajo\ESP32_oled_i2c_u8g2\build