2016-12-05 12:23 PM
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='"__weak=__attribute__((weak))"' /><listOptionValue builtIn='false' value='"__packed=__attribute__((__packed__))"' /><listOptionValue builtIn='false' value='USE_HAL_DRIVER' /><listOptionValue builtIn='false' value='STM32F446xx' /></option>
Solved! Go to Solution.
2017-01-20 08:23 AM
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
2016-12-05 12:38 PM
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__))'
2016-12-05 02:54 PM
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???
2016-12-06 04:15 AM
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 __weak
2016-12-06 04:18 AM
Yes, I also did it like that.
2016-12-06 04:23 AM
Ah, well you're smarter than I. I manually edited all my .cproject files first.
2016-12-06 08:51 AM
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
2017-01-20 08:23 AM
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
2017-01-20 12:07 PM
Shortly? 4.19.0 has been available for a couple of days already. Did this change make the cut?
2017-01-20 10:06 PM
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