Compilation failed on esp-idf empty project example.

julienD
Posts: 32
Joined: Fri Sep 13, 2019 12:38 pm

Compilation failed on esp-idf empty project example.

Postby julienD » Thu Nov 17, 2022 2:28 pm

Hello,

On W10 + vscode + esp-idf plugin.

I generated a brand new project with "esp-idf: New project", I choosed "empty project". The project is named... "project-name" ! :D
Here's the full compilation log:

Code: Select all

 *  Executing task: cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B xxxxx\project-name\build -S xxxxx\project-name 

-- Found Git: C:/Espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1") 
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c3
CMake Error at C:/Users/xx/esp/esp-idf/tools/cmake/component.cmake:219 (message):
  CMake Warning (dev) at build_properties.temp.cmake:7:

    Syntax Warning in cmake code at column 51



    Argument not separated from preceding token by whitespace.

  Call Stack (most recent call first):

    C:/Users/xx/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:3 (include)

  This warning is for project developers.  Use -Wno-dev to suppress it.



  CMake Error at
xxx/project-name/components/esp-idf/CMakeLists.txt:2
  (project):

    project command is not scriptable

  Call Stack (most recent call first):

    C:/Users/xx/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:106 (include)
    C:/Users/x/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:124 (__component_get_requirements)





Call Stack (most recent call first):
  C:/Users/xx/esp/esp-idf/tools/cmake/build.cmake:491 (__component_get_requirements)
  C:/Users/xx/esp/esp-idf/tools/cmake/project.cmake:378 (idf_build_process)
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!
See also "xxxxx/project-name/build/CMakeFiles/CMakeOutput.log".

 *  The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -B xxxxxx\project-name\build -S xxxxx\project-name" terminated with exit code: 1. 
Here's build_properties.temp.cmake:7 :

Code: Select all

set(COMPILE_DEFINITIONS "-D_GNU_SOURCE;-DIDF_VER="v4.4.1"")
I suspect "v4.4.1" should be escaped like this \"v4.4.1\" but not sure.

Anyway, what you I do to make this project compile?

Thanks
Julien

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Re: Compilation failed on esp-idf empty project example.

Postby felixcollins » Mon Oct 30, 2023 10:52 pm

Sorry for the necro-posting. I have this exact issue now with the latest vscode extension. I have it building with the command line. What did you do to fix it?

Who is online

Users browsing this forum: No registered users and 107 guests