ESP32 compilation

Sysprogs forums Forums VisualGDB ESP32 compilation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24476
    Johanan
    Participant

    We are developing project in Espressif “ESP32 WROVER” board which uses the “OV2640” camera.

    For this purpose we downloaded “esp-who” package with required libraries from this link: https://github.com/espressif/esp-who.

    We tried to compile this project by using “make flash” command in MSYS2 MINGW32 terminal window (as written in these links: https://docs.espressif.com/projects/esp-idf/en/latest/get-started/windows-setup.html and https://github.com/espressif/esp-who) and the example was compiled perfectly and worked.

    But when we tried to import this example to the “VisualGDB” environment and to compile it there, the compiler gave the link-errors because couldn’t find all required functions.

    The same errors were given when we tried to compile this example in windows command prompt by using “idf.py flash” command (As describe in this link: https://docs.espressif.com/projects/esp-idf/en/latest/get-started-cmake/index.html).

    These errors in “VisualGDB” compiler and in “Cmake” compiler executed in idf.py script were given because the linker couldn’t find some of required source code functions. These functions were given not in “.c” source-code-files, but in “.a” precompiled-code-libraries instead. The Linux-based “make” compiler found the required “.a” files and included them to the project. But the “VisualGDB” and “Cmake” windows-based compilers couldn’t include these “.a” files although they used the same “.mk” files and were executed from the same path.

    The required “.a” files exist in “esp-who\components\esp-face\lib” and in “esp-who\components\recorder_engine” paths. In both folders exist the “component.mk” files where defined the path for them. But despite of this the windows passed compilers don’t use include the libraries.

    What maybe the problem? What must we do to make VisualGDB to including the “.a” files to the project?

    Thanks

     

    #24477
    support
    Keymaster

    Based on your description, the project you are importing has up-to-date build scripts for GNU Make, but the CMake scripts are missing references to the .a files (CMake projects built with idf.py take settings from CMakeLists.txt and ignore the .mk files).

    You can work around this via one of the following options:

    • Simply import the project as a GNU Make-based project instead of CMake. This can be accomplished by renaming/deleting the CMakeLists.txt file from the imported project directory when importing it with VisualGDB.
    • Copy the library names from the .mk files to the CMake settings. VisualGDB can edit them automatically via VS Project Properties for the project, or you can use the variables described in the ESP-IDF CMake Reference.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.