IDF Component Manager

Sysprogs forums Forums VisualGDB IDF Component Manager

This topic contains 5 replies, has 3 voices, and was last updated by  support 10 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32851

    sve-jvi
    Participant

    Hi,

    In my application I need to include a dependency to a component from the espressif repository: https://components.espressif.com/

    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

    Thank you very much.

    #32853

    support
    Keymaster

    This looks like an error coming from the ESP-IDF build system and not something specific to VisualGDB. Please refer to the ESP-IDF documentation for more details on it.

    If you can build the same project outside VisualGDB, but not with VisualGDB, please follow the troubleshooting instructions here to get it working.

    #32876

    sve-jvi
    Participant

    Yes, I understand that this is not a VisualGDB issue, but I am asking how I can configure the Espressif toolsuit that comes with VisualGDB so that the component manager is enabled.

    In the official Espressif IDE we have the “ESP-IDF 4.4 CMD” where we can work from the command line.

    In this CMD we can execute the following command to enable the component manager:

    pip install idf-component-manager –upgrade

    And in the configuration of the project with dependencies developed with the Espressif-IDE we can define IDF_COMPONENT_MANAGER environment variable:

    My question is how can I build a project that has dependencies?

    Thank you very much.

    Attachments:
    You must be logged in to view attached files.
    #32879

    gojimmypi
    Participant

    hi @sve-jvi,

    you may be interested in this esp-idf-v5 issue on this forum, and Espressif idf-installer issue #143 on GitHub.

    I’m certainly interested if you make any progress.

    #32885

    sve-jvi
    Participant

    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.

    Attachments:
    You must be logged in to view attached files.
    #32902

    support
    Keymaster

    Thanks for sharing this. It indeed looks like a change in ESP-IDF structure and not something VisualGDB would handle automatically. That said, if you do not want to edit the CMakeLists files manually, you can always specify the extra environment variables via the VisualGDB GUI as shown below:

    Attachments:
    You must be logged in to view attached files.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.