IDF Component Manager

Sysprogs forums Forums VisualGDB IDF Component Manager

Viewing 8 posts - 1 through 8 (of 8 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.
    #34339
    gojimmypi
    Participant

    I’ve setup wolfSSL as a managed component.

    I’m hoping to use other components such as the esp-cryptoauthlib.

    Components are added to a project like this:

    idf.py add-dependency "espressif/esp-cryptoauthlib^3.5.1~1"

    It appears the only thing that command does is to add/update the project idf_component.yml file.

    Subsequent calls with idf.py build appear to recognize that component file, download required files to the managed_components directory, and compile everything.

    However, from within the VisualGDB environment, nothing new seems to happen at compile time: The IDE does not seem to recognize the ESP Registry components in the managed_components directory.

    I wasn’t able to find any VisualGDB documentation on this. It this capability supported? I’m using EDP-IDF v5.

    Thank you

     

    #34344
    support
    Keymaster

    Hi,

    You can export the build commands used by VisualGDB via the “Dump command line to batch file” command as shown on this page. This should allow you to reproduce the build problem outside VisualGDB and compare the command lines between the working and non-working build.

    Our best guess is that some environment variables or other minor parameters are slightly different between the 2 builds.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.