Sysprogs forums › Forums › VisualGDB › Update to BSP stm32 2019.06 caused 490 compiler warnings
Tagged: BPS upgrade, preprocessor defines
- This topic has 4 replies, 2 voices, and was last updated 5 years, 2 months ago by support.
-
AuthorPosts
-
September 18, 2019 at 10:24 #25821SRParticipant
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 definitionAfter 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?
September 19, 2019 at 03:59 #25833supportKeymasterHi,
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.
September 19, 2019 at 10:08 #25838SRParticipantHi,
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.
September 19, 2019 at 10:24 #25839SRParticipantHi,
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.
September 21, 2019 at 04:07 #25845supportKeymasterSorry, 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.
-
AuthorPosts
- You must be logged in to reply to this topic.