Syntax Warning in cmake code at column 47 error occurs in ESP32IDF

Preface

(1) ESP32 information is still quite difficult to find, and dealing with bugs is quite torturous. Today I will share a bug I encountered and how to deal with it.

Error log

(1) When I was doing some blogging the day before yesterday, I discovered a strange bug during testing. The error log is as follows.

CMake Error at F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/component.cmake:224 (message):
  CMake Warning (dev) at build_properties.temp.cmake:8:

    Syntax Warning in cmake code at column 47



    Argument not separated from preceding token by whitespace.

  Call Stack (most recent call first):

    F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:3 (include)

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



  fatal: not a git repository (or any of the parent directories): .git

  CMake Error at
  F:/HoloCubic/github_esp_box_V0.5.0/esp-box/components/bsp/CMakeLists.txt:24
  (message):

    PLATFORM unknown.

  Call Stack (most recent call first):

    F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:106 (include)
    F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:124 (__component_get_requirements) 





Call Stack (most recent call first):
  F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/build.cmake:574 (__component_get_requirements)
  F:/HoloCubic/IDF/Enter_ESP-IDF_container_directory/esp-idf/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:14 (project)


-- Configuring incomplete, errors occurred!
See also "F:/HoloCubic/github_esp_box_V0.5.0/esp-box/examples/factory_demo/build/CMakeFiles/CMakeOutput.log".

(2) Test environment: In order to write a tutorial on adding ESP32 components and do test experiments, I added an empty CMakeLists.txt to the component path to verify that the component addition of ESP32 is based on CMakeLists.txt to determine whether the path is valid. components. After adding CMakeLists.txt, deleting the CMakeLists.txt file and compiling again will cause the above error.

Solution

(1) I checked for a long time at that time and kept wondering what was causing the problem. Until I saw the following sentence, saying that my configuration was not completed and an error occurred!

Configuring incomplete, errors occurred!

(2) I was wondering what the configuration was, so I planned to check what configuration had the problem and found the sdkconfig file of the original project and compared it with the sdkconfig file of the project that is reporting the error now. It is found that there is less configuration information in the current project sdkconfig file.

Insert image description here

(3) So I thought of overwriting the sdkconfig file of the original project with the sdkconfig file of the project in question, and then there would be no problem with compilation.
(4) But some people must say, what should I do if they don’t keep the sdkconfig file of the original project? You can delete the sdkconfig file and dependencies.lock file in the project directory and recompile.

Guess the problem

(1) There should be an empty CMakeLists.txtfile in the component directory, causing the compiler to sdkconfigterminate the compilation without generating all the file configurations.
(2) After that, you compile again and the compiler finds that sdkconfigthe file exists in your project and will not process sdkconfigthe file again. However, the file at this time sdkconfigis wrong, and the subsequent compilation process must use sdkconfigthe file. Because sdkconfigthe file at this time is incomplete, it will cause problems in subsequent compilation.

Supongo que te gusta

Origin blog.csdn.net/qq_63922192/article/details/132939473
Recomendado
Clasificación