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

Eclipse Build Failed: Code Generated by STM32CubeMX


I try and fail to build an STM32 project in Eclipse following Carmine Noviello’s book: ((https://www.carminenoviello.com/mastering-stm32/|Mastering STM32)). The process I follow is:

  • Generate code in STM32CubeMX with SW4STM32 toolchain. Please note that there is no change in configuration (i.e. Pinout, Clock, or Tools), and the code generation process is successfully generated. However, there is no SW4STM32 subdirectory in the project root tree — unlike that that is suggested in the book this directory should appear as ~/STM32Toolchain/cubemx-out//SW4STM32/.

  • In Eclipse, I create a new C project with ARM Cross GCC Toolchain with Global Tools Paths pointed to gcc-arm\bin and Global Build Tools Path pointed to Build Tools\bin (as shown in the attached “eclipse-toolchain-and-build-paths.pdf”). Exit Eclipse.

  • Next, automatically import the code into Eclipse using Command Prompt or Terminal using ((https://github.com/cnoviello/CubeMXImporter|CubeMXImporter)). This process is successful judging from no error returned.

  • Back in Eclipse, refresh and build project. The error message is produced as follows.

= = > Start error message
13:35:18 **** Incremental Build of configuration Debug for project test-cubemx-auto-import ****
make all
Building target: test-cubemx-auto-import.elf
Invoking: GNU ARM Cross C++ Linker
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra -g3 -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L”../ldscripts” -Wl,-Map,”test-cubemx-auto-import.map” --specs=nano.specs -o “test-cubemx-auto-import.elf” ./system/src/stm32f4xx/stm32f4xx_hal.o ./system/src/stm32f4xx/stm32f4xx_hal_cortex.o ./system/src/stm32f4xx/stm32f4xx_hal_dma.o ./system/src/stm32f4xx/stm32f4xx_hal_dma_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_exti.o ./system/src/stm32f4xx/stm32f4xx_hal_flash.o ./system/src/stm32f4xx/stm32f4xx_hal_flash_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_flash_ramfunc.o ./system/src/stm32f4xx/stm32f4xx_hal_gpio.o ./system/src/stm32f4xx/stm32f4xx_hal_pwr.o ./system/src/stm32f4xx/stm32f4xx_hal_pwr_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_rcc.o ./system/src/stm32f4xx/stm32f4xx_hal_rcc_ex.o ./system/src/stm32f4xx/stm32f4xx_hal_tim.o ./system/src/stm32f4xx/stm32f4xx_hal_tim_ex.o ./system/src/newlib/_cxx.o ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o ./system/src/newlib/assert.o ./system/src/diag/Trace.o ./system/src/diag/trace_impl.o ./system/src/cortexm/_initialize_hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exception_handlers.o ./system/src/cmsis/startup_stm32f411xe.o ./system/src/cmsis/system_stm32f4xx.o ./src/main.o ./src/stm32f4xx_hal_msp.o ./src/stm32f4xx_it.o ./src/syscalls.o
c:/stm32toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/syscalls.o: in function `_sbrk’:
C:\STM32Toolchain\projects\test-cubemx-auto-import\Debug/../src/syscalls.c:118: multiple definition of `_sbrk’; ./system/src/newlib/_sbrk.o:C:\STM32Toolchain\projects\test-cubemx-auto-import\Debug/../system/src/newlib/_sbrk.c:45: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** makefile:64: test-cubemx-auto-import.elf Error 1
“make all” terminated with exit code 2. Build might be incomplete.

13:35:19 Build Failed. 3 errors, 0 warnings. (took 1s.279ms)
< = = End error message

Please also note that this problem occurs on the two following platforms running on Macbook Pro.

WINDOWS 10 (on Parallels Desktop 15 for Mac Home Edition)

  • MCU board: Nucleo F411RE
  • STM32CubeMX: version 5.5.0
  • Eclipse C/C++: 4.14 released
  • Java(TM) SE Runtime Environment: build 1.8.0_241-b07
  • Python: version 2.7.16
  • GCC ARM: none eabi 9 2019 q4 major win32


  • MCU board: Nucleo F411RE
  • STM32CubeMX: version 5.5.0-RC6
  • Eclipse C/C++: 4.10.0 released
  • Java(TM) SE Runtime Environment: build 12.0.1+12
  • Python: version 2.7.17
  • GCC ARM: none eabi 9 2019 q4 major mac 64 bit

I would appreciate if someone could point me to a solution for either platform and/or help to understand the error messages.