Sysprogs forums › Forums › VisualGDB › ESP-IDF files displayed wrong after renaming main
- This topic has 4 replies, 2 voices, and was last updated 6 years, 1 month ago by
julianr.
-
AuthorPosts
-
October 4, 2019 at 08:17 #26028
julianr
ParticipantI 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 6 years, 1 month 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.October 5, 2019 at 21:32 #26046support
KeymasterThanks 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.
October 8, 2019 at 17:03 #26102julianr
ParticipantA 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.
October 8, 2019 at 18:02 #26103support
KeymasterNo 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.
October 11, 2019 at 16:30 #26142julianr
ParticipantThis works great. Thank a lot!
-
This topic was modified 6 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.