2016-12-11 02:47 PM
Since the last update to CubeMX, new projects created for SW4STM32 on OSX are not compiling anymore. The project settings for C symbols are missing quotes:
__weak=__attribute__((weak))
instead of __weak='__attribute__((weak))'__packed=__attribute__((__packed__)) instead of __packed='__attribute__((__packed__))'
#stm32cubemxSolved! Go to Solution.
2016-12-11 09:55 PM
Yes, and if you are using Eclipse, you can fix this in:
C/C++ Build
Settings
MCU GCC Compiler
Symbols
Andrei from The Great White North
2016-12-11 09:55 PM
Yes, and if you are using Eclipse, you can fix this in:
C/C++ Build
Settings
MCU GCC Compiler
Symbols
Andrei from The Great White North
2016-12-11 10:42 PM
Thanks, that's what I did. Is it the right place here to report such bugs?
David
2016-12-11 11:49 PM
I believe so. This was reported last week and the ST people reported it to the developers.
On a similar topic, I had issues with SW4STM32 for Eclipse on macOS, version 1.12.0, screwing up some path variables. The symptom was that you could not compile anymore, the PATH variable was wrong. The result was a configuration alteration to get the C compiler working, but the debugger is broken. That has been reported over on openstm32.org.
2016-12-12 12:55 AM
OK, I didn't catch that one.
I did saw your other post regarding the problem with the PATH. I fixed it by making a copy of the GCC files one folder up in the expected PATH and that works for debugging too.
2017-04-10 11:00 PM
It seems to be still buggy in version 4.1(Winx64, Eclipse Neon 3)
For both compilers (gcc ang g++) the __weak and __packed symbols are defined without quotes:
As a result for c-files the gcc compiler is working fine
Invoking: MCU GCC Compiler
%cd%
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c11 '-D__weak=__attribute__((weak))' '-D__packed=__attribute__((__packed__))' -DUSE_HAL_DRIVER -DSTM32F411xE ...
Finished building: .../RosRobiF4/Middlewares/Third_Party/FreeRTOS/Source/croutine.c�?�?�?�?
whereas for cpp-files the g++ compiler is failing
Invoking: MCU G++ Compiler
%cd%
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c++0x -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F411xE ...
/usr/make/sh: -c: line 0: syntax error near unexpected token `('
/usr/make/sh: -c: line 0: `arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c++0x -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F411xE ...
make: *** [Application/User/Common/Communication.o] Error 258
�?�?�?�?�?�?
Obviously the g++ compiler needs the quotes ...
Best regards,
Michael.