cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.18.0 bug in .cproject

Elwood Downey
Associate II
Posted on December 05, 2016 at 21:23

I use CubeMX on maxOS to generate projects for SW4STM32 then run a 

https://github.com/baoshi/CubeMX2Makefile

 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>

13 REPLIES 13
Vitor Barbosa
Associate II
Posted on February 28, 2017 at 23:48

Hello,

I was desperate with this bug. I have STM32CubeMX 4.19.0 and this bug still occurs in this version.

The suggested fix works adding the element &quot; in .cproject file, near packed and weak, in the generated file.

Thank you!

Posted on March 01, 2017 at 10:45

Hello Vitor,

Great thanks for your feedback.

As we are improving continuously our SW offer, I am interrested in your working environment.

Could you please share the following info:

   your OS ?

   which java version ?

   How have you installer CubeMX (fresh install or update)?

   Could you upload your ioc ?

   Could you upload Cube log file ?

Great thanks in advance for your feedback.

Kind regards

Sirma

Posted on March 01, 2017 at 23:13

Hello Siang,

My replies to your questions.

your OS ? XP + SP3

which java version ? Java 8 update 25

How have you installer CubeMX (fresh install or update)? I think it was a fresh install

Could you upload your ioc ? in attach DemoL152V2.ioc

Could you upload Cube log file ? (what kind of file is this?)

Systems Workbench for STM32 SW4STM32 release 1.1

Best regards,

Vitor Barbosa

________________

Attachments :

DemoL152V2.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyqD&d=%2Fa%2F0X0000000bDD%2FubSRlKHtui5TJofrDGinoGAY5tbJgR272U2lhsPLPNg&asPdf=false
Posted on March 02, 2017 at 00:06

I have the same problem here, 4.19.0 and generated the code for SW4STM32 and the same issue still arises.

All freshly installed the last 3 days.

It is on Windows 8.0 / Java 8 update 121

One interesting part: It only happens if you create a project really from scratch. If you update it (and was manually fixed) it regenerates correct code.