Update to BSP stm32 2019.06 caused 490 compiler warnings

Sysprogs forums Forums VisualGDB Update to BSP stm32 2019.06 caused 490 compiler warnings

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #25821
    SR
    Participant

    Hi,

    I recently updated a STM32 project from BSP-Version 2018.12R2 to 2019.06 and let VisualGDB upgrade the project file.
    When first compiling the solution it reported 490 compiler warnings, all of the following 3 types.

    stm32f4xx_hal_smbus.c
    <command-line> : warning : ISO C99 requires whitespace after the macro name
    usbd_core.c
    <command-line> : warning : ISO C++11 requires whitespace after the macro name
    <command-line> : warning : ISO C++11 requires whitespace after the macro name
    <command-line> : warning : “$$com” redefined
    <command-line>(0): note : this is the location of the previous definition

    After a little research I found, that the upgrade added two preprocessor defines to the file ‘stm32.props’

     <ClCompile>
    <PreprocessorDefinitions>…; $$com.sysprogs.efp.profiling.address_validators$$;$$com.sysprogs.efp.profiling.rtos$$</PreprocessorDefinitions>
    <…>
    </ClCompile>

    Removing these two preprocessor defines helps with the compiler warnings.

     

    Is it okay to just remove the preprocessor defines or would you suggest an alternative solution?

    #25833
    support
    Keymaster

    Hi,

    This looks like some properties defined in the Semihosting/Profiler framework did not get expanded correctly. Normally, opening VisualGDB Project Properties and clicking “regenerate MCU files” should automatically fix this (it might be caused by missing packages that you mentioned in the other thread). Removing the definitions manually is generally not recommended, as it may confuse the framework sources (in case the references to them were not removed from the project), however regenerating the settings via VisualGDB Project Properties will overwrite any changes to stm32.props anyway.

    #25838
    SR
    Participant

    Hi,

    thanks for your prompt response!

    Clicking “Embedded Project/Regenerate MCU files” only regenerated the visualgdbsettings-files, not the stm32.props.
    But clicking “MSBuild settings/Rebuild MSBuild & IntelliSense files for this toolchain” did the trick.

    Thanks for your help.

    PS: No, this was not caused by missing packages, as this happened on my – already set up – machine, not my new co-worker’s.

    #25839
    SR
    Participant

    Hi,

    I just noticed: every time I regenerated a file (8 times for different gdbsettings and and 1 time for MSBuild toolchain) via the VisualGDB Project Properties, VisualGDB duplicated entries in the “Project.vcxproj.filters” file. I have attached a file with all duplicated entries.

    This is no biggie, as it doesn’t have any side-effects, but I imagined you might want to know about this behavior.

    #25845
    support
    Keymaster

    Sorry, we have tried reproducing this with a few different setups, but the .filters file was updated correctly each time. Most likely, the problem is caused by some specific combination of settings in a project that was created with an older VisualGDB version and modified manually.

    Either way, if the problem does not trigger for newly created projects and does not disrupt your workflow with the existing ones, we would simply advise ignoring it, as it should not have any noticeable effects.

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