switching between processors with project configuration?

Sysprogs forums Forums VisualGDB switching between processors with project configuration?

This topic contains 1 reply, has 2 voices, and was last updated by  support 3 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33295

    Haqim
    Participant

    Hey,

     

    I am using VisualGDB to build for some STM32 Cortex-M4 processors. My Solution and projects are structured so that i have various library projects and 2 application projects using those libraries.

     

    I now want to add a 3rd processor, an Cortex-M0 and be able to switch to this build with a build configuration. For this my library projects should get another build configuration.

     
    <h2>Can I do this with VisualGDB?!</h2>
     

    Release & Debug configurations both use a XML file (in my case: MCU.xml) and a props file (in my case: MCU.props).

    My Libs at the moment build with this:

    ASFLAGS: -mfpu=fpv4-sp-d16
    Common flags: -mcpu=cortex-m4 -mthumb -mfloat-abi=hard

     

    As i see it, i can create a new build configuration, using another xml file for hardware description. The problem is that the mcu.props also uses this information and can’t be duplicated.

     

    I tried using VisualStudio Project file settings to add CM4 definitions, but this isn’t working.

    I fear that just adding another MCU_CM0.xml and referencing to it in the CM0 build configuration will not work either as CM4-Informations are still in the mcu.props file…

    #33303

    support
    Keymaster

    Hi,

    In general, we would advise migrating your project to Advanced CMake. You could then organize your project to have multiple platforms, each targeting a specific MCU, and multiple targets (applications/libraries) reusing the same MCU definition from the platform. E.g. see this tutorial.

    If you would like to keep MSBuild instead, you would need to fork the mcu.xml and mcu.props files and update the references as shown below:

    Location Element Target
    MSBuild projects properties -> Embedded Project MSU Build Settings File New mcu.props file
    MSBuild projects properties -> Embedded Project VisualGDB Settings File New .vgdbsettings file
    New .vgdbsettings file <EmbeddedProfileFile> New mcu.xml file

    This will keep the settings in multiple configurations/platforms separate from each other.

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

You must be logged in to reply to this topic.