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

Using Build Variables in debug Initialization Commands


The problem is a bit more complex; the debugger always put the code where the link editor decides to put it, so changing where the code is placed (RAM or FLASH) has to be done by edititing the link editor script.

The default link editor script places code in FLASH, not in SRAM, so starting a debug session will flash your program on the board; I don’t know what makes you think the program was placed in RAM.

Note that there is also a “Target” submenu in the project context menu where you can clear or flash the target board with your program.

Bernard (Ac6)