cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.18.0 bug in .cproject

Elwood Downey
Associate III
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>

1 ACCEPTED SOLUTION

Accepted Solutions
Sirma Siang
ST Employee
Posted on January 20, 2017 at 17:23

Hello Elwood and all,

Great thanks for your feedbak.

I just tested, and I can confirm you that this issue is fixed in CubeMX4.19.

This version will be shortly available.

Kind regards

Sirma

View solution in original post

13 REPLIES 13
Posted on December 05, 2016 at 21:38

I was just about to post the same thing. I Updated to 4.18 and ended up without working project, and I could not post because the forums were down. It took me some time to figure out those quotes. CubeMx generates:

__weak=__attribute__((weak))

__packed=__attribute__((__packed__))

And it should be:

__weak='__attribute__((weak))'

__packed='__attribute__((__packed__))'

Posted on December 05, 2016 at 22:54

Strangely, I was working on this same problem this morning. After I figured out the quotes thing, Eclipse couldn't find arm-none-eabi-gcc. Sigh, how did it know that I was starting into the code portion of my article???

Posted on December 06, 2016 at 12:15

Thank you very much for tracking this down. I thought I was about to loose all my hair.

If people don't want to edit the .cproject file and track it down in the code, you can do it in eclipse:

Project/properties/C/C++ General/Paths and Symbols 

Select Symbols tab:

Add the '' '' around the Values for __packed and __weak0690X00000605kSQAQ.png

Posted on December 06, 2016 at 12:18

Yes, I also did it like that.

Posted on December 06, 2016 at 12:23

Ah, well you're smarter than I. I manually edited all my .cproject files first.

Nesrine M_O
Lead II
Posted on December 06, 2016 at 17:51

Hi,

I'll report this issue to our MX team for checking.

Sorry for the inconvenience may bring.

-Nesrine-

If my suggest answers your question, please mark it as correct.

Thank you

 

Sirma Siang
ST Employee
Posted on January 20, 2017 at 17:23

Hello Elwood and all,

Great thanks for your feedbak.

I just tested, and I can confirm you that this issue is fixed in CubeMX4.19.

This version will be shortly available.

Kind regards

Sirma

Posted on January 20, 2017 at 20:07

Shortly? 4.19.0 has been available for a couple of days already. Did this change make the cut?

Posted on January 21, 2017 at 06:06

I updated my computer to 4.19.0 this evening and - yes this has been fixed.

Thank you and your coworkers for taking care of this. I will let the people on the AC6 board know.

A