ESP32 with VisualGDB and Component Management

387 Views Asked by At

In my application I need to include a dependency to a component from the espressif repository

When I build the project, the toolsuite detects the dependency but cannot update the component because it says that the component manager has not been enabled.

CMake Warning at C:/SysGCC/esp32/esp-idf/v4.4.1/tools/cmake/build.cmake:482 (message):
“idf_component.yml” file was found for components:
C:/Users/user/Documents/Proyectos/ESP32/Firmware/Prue/P29/mb_master/main
However, the component manager is not enabled.

What is the procedure to enable the Component Manager?

I use Visual Studio 2019 16.11.17 / VisualGDB-5.6R6-4622 / Toolchain 8.4.0/8.1.0/r9 / ESP-IDF v4.4.1

1

There are 1 best solutions below

0
On

I have already found the solution.

On the website idf-component-manager it says:

Starting ESP-IDF v4.4 the idf-component-manager package is installed by default and no extra action is necessary.

Since I use v4.4.1 I don’t need to run the pip command.

To enable the component manager in the project configuration phase, you must add the following variable in the CMakeLists.txt of the project root:

set(ENV{IDF_COMPONENT_MANAGER} “1”)

In this way, in the configuration phase, when the idf_component.yml file is found in the main component, the dependency is executed and the referenced component is downloaded:

Solving dependencies requirements
Updating lock file at C:/Users/user/Documents/Tmp/espressif/mb_slave\dependencies.lock
Processing 2 dependencies:
[1/2] espressif/esp-modbus (1.0.4)
[2/2] idf (4.4.1)
— DEBUG: Use esp-modbus component folder: C:/Users/user/Documents/Tmp/espressif/mb_slave/managed_components/espressif__esp-modbus.

This is very important because the freemodbus component has been moved to a separate esp-modbus repository from v5.0.