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-02-28 02:48 PM
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 " in .cproject file, near packed and weak, in the generated file.
Thank you!
2017-03-01 02:45 AM
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
2017-03-01 03:13 PM
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=false2017-03-01 04:06 PM
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.