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


System Workbench build error new project from CubeMX

Summary of 2 days investigations for CubeMX and System Workbench

For success build without errors imported project generated in CubeMX, need fix generated symbols

In Project->Properties->C/C++ Builds->Settings->MCU GCC Compiler->Symbols

__weak=__attribute__((weak))
__packed=__attribute__((__packed__))
need set values
__attribute__((XXXXX))
in double quotes -
"__attribute__((XXXXX))"


Sample:

__weak="__attribute__((weak))"
__packed="__attribute__((__packed__))"


Else you can see follow errors after import

23:19:10 **** Incremental Build of configuration Debug for project blink ****
make all
Building file: ../Src/main.c
/bin/sh: -c: line 0: syntax error near unexpected token `(‘
/bin/sh: -c: line 0: `arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I”/Users/asergeev/stm/workspace/blink/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Device/ST/STM32F3xx/Include” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.c”’
make: *** Src/main.o Error 2
Invoking: MCU GCC Compiler
/Users/asergeev/stm/workspace/blink/Debug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I”/Users/asergeev/stm/workspace/blink/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Device/ST/STM32F3xx/Include” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.c”

Hi

Your findings are excellent but obsolet now.
Even with the error every thing was working as expected.

Dieter


Hi, there are already several threads about this issue. It occurs on Linux or OS-X, whereas it works on Windows even without the quotes.

I am working with Windows 7 x64, AC6 Version: 1.13.0.201701121612 and CubeMX 4.19.0 and this is still revelevant. Without the quotes the code wont compile, I have to modify the symbols each time I import a new project made in CubeMX.

Why do Dieter and Vetch say that it works with the error?

Before upgrading to AC6 1.12 and CubeMX 4.18 I always had an syntax error at symbol __weak.
Nevertheless the project was sucessfully build always. Also redeclarations of those functions worked well.
Last version of AC6 with that error for me was 1.8. BTW; I’m working with Linux only. I have never tried AC6 1.13.