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


Error 258 on CubeMX imported project


Hi,

I’m pretty new to SW4STM32, CubeMX and HAL libraries (so far I’ve been using Coocox IDE, with standard peripheral firmware).

In CubeMX, I’ve set up the simplest configuration for a NucleoF401 (all IPs to standard config) and carrefully followed all the steps to create/import CubeMX project into SW4STM32 (up to the Artifact name stuff).

Then, when I try to buid the project I’ve got this problem (see console output below).

Any clue ? I wonder why “arduino” is showing up... I’ve done nothing for that ! The project toolchain is Ac6 STM32 MCU GCC.

I’m using latest releases of both SW4STM32 and CubeMX (4.9).

Sorry, it’s probably something stupid...

Thanks for help.


13:01:50 **** Build of configuration Debug for project nucleoF401 Configuration ****
make all
Building file: D:/myworkspace/nucleoF401/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c
Invoking: MCU GCC Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F401xE -I......\Inc -I......\Drivers\STM32F4xx_HAL_Driver\Inc -I......\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy -I......\Drivers\CMSIS\Include -I......\Drivers\CMSIS\Device\ST\STM32F4xx\Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF”Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.d” -MT”Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.o” -o “Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.o” “D:/myworkspace/nucleoF401/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c”
“C:/Program Files/Arduino/hardware/tools/avr/utils/bin/sh.exe”: -c: line 1: syntax error near unexpected token `-Dweak=attribute__((’
“C:/Program Files/Arduino/hardware/tools/avr/utils/bin/sh.exe”: -c: line 1: `arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F401xE -I......\Inc -I......\Drivers\STM32F4xx_HAL_Driver\Inc -I......\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy -I......\Drivers\CMSIS\Include -I......\Drivers\CMSIS\Device\ST\STM32F4xx\Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF”Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.d” -MT”Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.o” -o “Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.o” “D:/myworkspace/nucleoF401/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c”’
make: *** Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.o Error 258

13:01:50 Build Finished (took 240ms)


Well, I removed “weak=attributeweak” and “packed=attributepacked” from the list of defined symbols within C/C++ Settings and my error is gone. I wonder why CubeMX does that.

Then, I had to change all the include paths into absolute paths, and finally browse for the .elf manually.

Now it is working on the target board !

Not sure I did things correctly anyway.

As a teacher, I’m looking for easy ways to help students having their hands on STM32 faster. CubeMX is wonderfull to understand IP settings. I hope that integration with SW4STM32 will be improved in the future.

Thanks for all the work that is done !

L.


Hello, Latorre.
Try to change (example for Eclipse and STSW4STM32) in Tool Settings - MCU GCC Compiler - Symbols,
from

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

to

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


And in Includes, from paths like

..\..\..\Inc
..\..\..\Drivers\STM32F1xx_HAL_Driver\Inc

to different slashes

../../../Inc
../../../Drivers/STM32F1xx_HAL_Driver/Inc



But other generated project compiled perfectly with all default settings...

2015-07-28
Possible reason - path to sh in system enviroment variable %PATH%. When sh accessible thru path, compilation failed and requires settings update (above).
If sh not accessible, compilation successful.

For me it was exactly the other way around.
I had to REMOVE the quotes around the symbols!

Using Windows 7 64 bit installer Version v2.4.

Since I took over the project from a colleague, I am not sure if he had changed that before.


I solved the problem by removing the “.metadata” folder from the workspace folder
then recreadte the workspace again
everything worked fine


i had yesterday the same problem with the 258 error. I have reinstalled windows from scratch and the problem was solved.