Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


/bin/sh: -c: line 0: syntax error near unexpected token `('


On Mac OSX (latest) I am getting this error:

13:36:04 **** Build of configuration Debug for project TEST-F0 ****
make all
Building file: ../Src/gpio.c
Invoking: MCU GCC Compiler
/Users/adk/Documents/workspace.stm32/TEST-F0/Debug
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F031x6 -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Inc” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/STM32F0xx_HAL_Driver/Inc” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/gpio.d” -MT”Src/gpio.o” -o “Src/gpio.o” “../Src/gpio.c”
/bin/sh: -c: line 0: syntax error near unexpected token `(’
/bin/sh: -c: line 0: `arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F031x6 -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Inc” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/STM32F0xx_HAL_Driver/Inc” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”/Users/adk/Documents/workspace.stm32/TEST-F0/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/gpio.d” -MT”Src/gpio.o” -o “Src/gpio.o” “../Src/gpio.c”’
make: *** Src/gpio.o Error 2

13:36:04 Build Finished (took 91ms)


Anybody else getting this error?

Hi,

I got nearly the same on my Linux64 install.

The workaround I found is to edit the .cproject xml file and replace

value=”weak=attributeweak” with value=”weak="attributeweak"”
and
value=”packed=attributepacked” with value=”packed="attributepacked"”

It seems gcc is waiting something between “...” when using atrributeblabla (?)

I’m using CubeMX, so I edited the .cproject file created by Cube, so it is OK when importing it in ac6

Hope it helps,
J.



I just found similar on Linux on a newly generated (by cubemx 4.18) project.

/bin/sh: 1: Syntax error: “(” unexpected

when building with :
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked......

Parentheses like () means to process in a sub-shell in a posix shell, so this won’t work on Linux / OSX. The solution for me was to escape with " in the .cproject file as jea74 suggested - thanks !

I tried to post the exact changes I made for reference but the forum just truncates the post.
Anyway, just seen the post above about the bug report...

Thanks @dangermouse that worked for me

My issue poped up when I upgraded to STM32CubeMX 4.18.0
The correct values were infact in the .cproject file, however the incorrect ones with the bad syntax were also, there so I just commented them out


For me the original code was:

value="__weak=__attribute__((weak))"

and

value="__packed=__attribute__((__packed__))"


In both lines I have to put " after the second = and after the last ) to make it work.

Thanks for your help!

Edit: it is already mentioned in the link in the post of Andrei from The Great White North. I guess I should read better. redface