AnsweredAssumed Answered

STM32CubeMX 4.18.0 bug in .cproject

Question asked by Elwood Downey on Dec 5, 2016
Latest reply on Mar 2, 2017 by Henri de Veer

I use CubeMX on maxOS to generate projects for SW4STM32 then run a script to generate a Makefile for the gnu gcc toolchain. This worked fine on MX 4.16 and 4.17 but it broke today when I installed to 4.18. I tracked it down to four missing " entities in .cprofile where it defines the C preprocessor values.

 

The incorrect line generated by MX is:

 

 

<option id="gnu.c.compiler.option.preprocessor.def.symbols.1056679357" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"><listOptionValue builtIn="false" value="__weak=__attribute__((weak))" /><listOptionValue builtIn="false" value="__packed=__attribute__((__packed__))" /><listOptionValue builtIn="false" value="USE_HAL_DRIVER" /><listOptionValue builtIn="false" value="STM32F446xx" /></option>

 

But it should be:

 

 

<option id="gnu.c.compiler.option.preprocessor.def.symbols.1056679357" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"><listOptionValue builtIn="false" value="&quot;__weak=__attribute__((weak))&quot;" /><listOptionValue builtIn="false" value="&quot;__packed=__attribute__((__packed__))&quot;" /><listOptionValue builtIn="false" value="USE_HAL_DRIVER" /><listOptionValue builtIn="false" value="STM32F446xx" /></option>

Outcomes