ESP-IDF files displayed wrong after renaming main

Sysprogs forums Forums VisualGDB ESP-IDF files displayed wrong after renaming main

This topic contains 4 replies, has 2 voices, and was last updated by  julianr 1 month, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26028

    julianr
    Participant

    I have a ESP-IDF cmake project where I renamed the main folder according to this comment: https://github.com/espressif/esp-idf/issues/2801#issuecomment-445626586

    The project compiles fine and is displayed correctly until I add a component. Then VisualGDB mixes the source of the new “main folder” (renamed to src) and the component sources.¬† This is just a visual issue, compilation still works fine. I attached a screenshot showing the issue.

    • This topic was modified 2 months ago by  julianr. Reason: The comment in the fist screenshot is wrong. There is a src folder inside the component
    Attachments:
    You must be logged in to view attached files.
    #26046

    support
    Keymaster

    Thanks for confirming your support status.

    Normally, VisualGDB would display the sources of each component under a corresponding entry in the “Components” view except for the component called “main”. The contents of “main” is shown directly under the project item for convenience.

    Based on the screenshots it looks like VisualGDB could not find the main component anymore, so picked up the first component reported by ESP-IDF and merged its contents directly underneath the project view instead.

    Normally, we would advise keeping the “main” component name if you decide to move it into a different folder, as it clearly indicates which of the component contains the startup code and makes the project structure easy to read. We could also add an setting that would allow overriding the main component name by editing the XML contents of the .vgdbcmake file, although we would generally advise keeping the main name for readability.

    #26102

    julianr
    Participant

    A option like that would be really helpful. In my opinion the name “main” is misleading since there is the complete application code excluding external libraries (which are then inside the components folder).

    All my projects usually have a “src” folder where the application code is stored and then some “lib” or “shared” depending on the project. It would be great if I can keep this setup with a ESP-IDF cmake project.

    #26103

    support
    Keymaster

    No problem, please try this build: VisualGDB-5.5.1.3294.msi

    We have added a context menu command “Set as Main Component” to the ESP-IDF component items in Solution Explorer for CMake projects. Flagging an arbitrary component as the “main” one will now merge its contents directly under the top-level item in Solution Explorer.

    #26142

    julianr
    Participant

    This works great. Thank a lot!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.