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

#include in linker script


I would like to use a #include inside my linker script to set the origin address of the flash, something like :


CURRENT_ADDRESS is defined in a header file used by my source code :

#define CURRENT_ADDRESS 0x0800C000

I know it’s possible, I tried some things I found on google but without any success.
Do you know a way to do that with SW4STM32 ?

Thank you,


I finally found out how to proceed, I explain it for those who are interested :

You just have to follow the explanation number 3) of Giuseppe Guerrini on this thread with few modifications :


For b) I saved the script as linker_temp.c (you can either save it as linker_temp.ld)

For 3) c) go to Project > Properties > C/C++ Build > Settings > Build Steps and write the following command on Pre-build steps > Command :

arm-none-eabi-gcc -P -E ..\linker_temp.c -o ..\STM32F411RETx_FLASH.ld

See the picture attached.

Change the name of your input and output file (linker_temp.c and STM32F411RETx_FLASH.ld for me) according to your project.
And pay attention to the path of each file, even inside the linker_temp file when including your header file.