Hi, I see that VisualGDB IntelliSense doesn’t make sense of the project’s currently selected type of floating-point. It just put ‘softfp’ and then does wrong macro selection in standard Cortex M header:
#elif defined ( __GNUC__ )
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)
#define __FPU_USED 1U
#else
#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#define __FPU_USED 0U
#endif
#else
#define __FPU_USED 0U
#endif
However, I noticed that it allows conditional addition to predefined macro container called %(ClCompile.PreprocessorDefinitions), something like
<ClCompile Condition=”‘@(ToolchainSettingsContainer->Metadata(‘ARMCPU’))’ == ‘cortex-m0′”>
Could you tell me how to make a condition for automatic soft/hard floating point selection? Something like:
<ClCompile Condition=”‘@(ToolchainSettingsContainer->Metadata(‘FPUType’))’ == ‘soft'”>
//… add __SOFTFP__ macro, etc
Or if there is a FPU:
<ClCompile Condition=”‘@(ToolchainSettingsContainer->Metadata(‘FPUType’))’ == ‘hard'”>
//… add __VFP_FP__ macro, __FPU_PRESENT=1, etc