User specific virtual folder in STM32CubeMx projects

Sysprogs forums Forums VisualGDB User specific virtual folder in STM32CubeMx projects

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32296
    Timo Engelmann
    Participant

    Hi there,

    I try currently to switch over from a MSBuild based STM32 project structure to the “new” CMake based STM32CubeMx project structure.
    I read this tutorial for that: https://visualgdb.com/tutorials/arm/stm32/cube/advanced/
    and it seams everything very good.
    But I need some user defined virtual folders in the Visual Studio Solution Explorer.
    The attached screenshot “VisualGDB_PrjStructure_MSBuild.jpg” shows my the current project structure with several Filter folders.
    VisualGDB_PrjStructure_MSBuild.jpg
    The filter folders 01_… to 03_… and 05_… contains my own code.
    The 04_BSP contains the STM32CubeMx generated code but also my own BSP additions.
    Additional the Doxy Folder contains the settings for Doxygen.

    Now in the new structure I try to add a virtual folder on  Project Level by using the context menu (see attached screenshot “VisualGDB_AddVirtualFolder.jpg”)
    VisualGDB_AddVirtualFolder.jpg
    But unfortunately the virtual folder is added in “ProjectFolder/Source Files/New Virtual Filter”
    But I don’t like the separation in “Source Files” and “Header Files”.

    Is there a way to move or create the virtual folders on the same level as “STM32CubeMxFiles”?

    Thanks for a helpful answer and best regards,
    Timo

    Attachments:
    You must be logged in to view attached files.
    #32299
    Timo Engelmann
    Participant

    With a painting tool I have rearrange the original folder structure of the STM32CubeMX CMake project in screenshot “VisualGDB_Original_Folder_Structure.jpg”

    • For me the perfect structure would be as shown in “VisualGDB_Perfect_Folder_Structure.jpg”
    • Also good would be the structure shown in “VisualGDB_Good_Folder_Structure.jpg”
    • Not really good, but ok would be the structure shown in “VisualGDB_Ok_Folder_Structure.jpg”

    It would be really cool if you have a solution for that.

    Greetings Timo

    Attachments:
    You must be logged in to view attached files.
    #32308
    support
    Keymaster

    Hi,

    No problem, this can be easily configured via VS properties (not VisualGDB Project Properties) for the top-level project node in Solution Explorer (with the triangle icon).

    You can simply set the Sorting/Grouping -> Groups Sources By Types to False, and the source/header files filters will disappear throughout the project.

    The STM32CubeMX files item is a special case though – it internally counts as a BSP item (like the one with the chip icon), but is displayed underneath the main executable to improve usability.

    You can try creating a virtual target folder via context menu of the top-level project node and moving it there. Currently, this triggers a bug where the folder will appear in both places, but if using target folders for the STM32CubeMX files folder works for you, we can easily fix it.

    #32311
    Timo Engelmann
    Participant

    Hello support team,

    thank you very much for the quick and helpful answer.
    I will not move the STM32CubeMx folder. For me it is ok that this folder is on the upper level.

    This is equal to my “Good Folder Structure“.

    I repeat myself: thank you very much!
    Besides the functionality, it is the very good and fast support why I love this tool!

    Have a nice day and best regards,
    Timo

    #32313
    support
    Keymaster

    Hi,

    Good to know it works and thanks for the kind words.

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