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 two short videos (registration required) highlighting:

System Workbench for STM32

Problems with Cube-generated Release build

I am having constant problems with building “Release” configuration of the Cube-generated projects. I’ve found many topics here describing similar problems, so it seems I am not alone. Posting here two workarounds that helped me, but would really like to hear from the developers on the nature of these and maybe see some bug fixes in the future.

Problem 1
in combined command line for C++ linker for “Release” build the following two entries


included twice, which causes an error. To work around this bug go to
Project->Properties->C/C++ Build->MCU G++ Linker->Miscellaneous
(for “Release” build only!) and remove these two settings from “Linker Flags”.
Go back to Project->Properties->C/C++ Build->MCU G++ Linker and check combined command line, it should now have these only once.

Problem 2
in combined command line for C++ compiler for “Release” build the following four entries


included twice, first with “-D” and then without “-D”. The second inclusion causes an error
syntax error: unexpected “(”
To work around this bug go to
Project->Properties->C/C++ General->Paths and Symbols->#Symbols
edit any value and apply changes. Then restore original value and apply again.
Return to Project->Properties->C/C++ Build->Settings->MCU G++ Compiler.
Check combined command line again, it should now have those entries only once with “-D”.

Problem 3
After two workarounds above the combined options for compilers are almost exactly the same, with the only exception -g3/-g flags, as expected. Regardless of this, the Release configuration still fails, with the compiler complaining about missing MCU specification. The comparison of the actual command lines passed to the MCU G++ Compiler shows that -D parameters are not passed in Release build.
Here are “All options” in the Project Properties dialog:

-mcpu=cortex-m3 -mthumb -mfloat-abi=soft -D__weak=__attribute__((weak)) -D__packed=__attribute__((__packed__)) -DUSE_HAL_DRIVER -DSTM32F103xB -I../Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -I"D:\eclipsePjt\SW4STM32_WS\libraries\Utilities" -I"D:\eclipsePjt\SW4STM32_WS\libraries\Utilities\platform\STM32F1" -Og -g -Wall -fmessage-length=0 -ffunction-sections -c -fno-exceptions -fno-rtti

And here is a command line:

Invoking: MCU G++ Compiler
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -mfloat-abi=soft  -I"D:/eclipsePjt/SW4STM32_WS/projects/can_uart/Inc" -I"D:/eclipsePjt/SW4STM32_WS/projects/can_uart/Drivers/STM32F1xx_HAL_Driver/Inc" -I"D:/eclipsePjt/SW4STM32_WS/projects/can_uart/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy" -I"D:/eclipsePjt/SW4STM32_WS/projects/can_uart/Drivers/CMSIS/Device/ST/STM32F1xx/Include" -I"D:/eclipsePjt/SW4STM32_WS/projects/can_uart/Drivers/CMSIS/Include" -I"D:/eclipsePjt/SW4STM32_WS/libraries/Utilities" -I"D:/eclipsePjt/SW4STM32_WS/libraries/Utilities/platform/STM32F1"  -Og -g -Wall -fmessage-length=0 -ffunction-sections -c -fno-exceptions -fno-rtti -MMD -MP -MF"Utilities/platform/STM32F1/can_impl.d" -MT"Utilities/platform/STM32F1/can_impl.o" -o "Utilities/platform/STM32F1/can_impl.o" "D:/eclipsePjt/SW4STM32_WS/libraries/Utilities/platform/STM32F1/can_impl.cpp"

I have no idea how to fix this one.

As a side note, this seems to be a problem with settings providers, not with cube generated project.


Newest Forum Posts

  1. Holy fuck by mkellinghusen, 2020-12-02 22:54
  2. Holy fuck by rhaley-starfish, 2020-12-02 19:46
  3. Unable to Build and Clean Program in STM32CubeIDE by chandlerbing65nm, 2020-12-01 15:25
  4. Holy fuck by jqwpb, 2020-12-01 09:45
  5. Ubuntu 19.04 Debug problems by wigir, 2020-11-29 20:38
  6. SW4STM32 installation on Ubuntu 20.04 LTS by ImedBriki, 2020-11-27 23:43
  7. Serial Printing on STM32F1 using CubeMX by LORDHADES, 2020-11-27 09:04
  8. gdb not connected to openocd for debug by avf1906, 2020-11-23 10:26
  9. STM32F103 + CAN -> microcontroller does not release the frame from FIFO banks by amilo_pa, 2020-11-17 09:08
  10. STWINKT1 as HID by greale, 2020-11-13 13:03

Last-Modified Blogs