Skip to main content
srikanth
Associate III
July 9, 2021
Question

STM32MP157 cortex M4 programming (.elf burning)from the Cortex A7

  • July 9, 2021
  • 5 replies
  • 3384 views

We are generated a code from the Cube MX and written the application its working fine in debug mode through JTAG. But we want to put it into the Sd card . For this what is the procedure and how to enable the cortex M4 controller form A7.

This topic has been closed for replies.

5 replies

Olivier GALLIEN
Technical Moderator
July 9, 2021

Hi @srikanth​ ,

You may found useful information related to M4 management in wiki, started from page :

https://wiki.st.com/stm32mpu/wiki/Coprocessor_management_overview

Hope it help

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
srikanth
srikanthAuthor
Associate III
July 9, 2021

Thank you for the reply . We loaded the .elf file generated from the cube ide to the address 0xC2000000. after loading from serial link . the cortex M4 code is not running . That is M4 code is not running . We are new to the linux .

PatrickF
Technical Moderator
July 12, 2021
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
LudovicR
ST Employee
July 13, 2021

Hi @srikanth​ 

For your information, inside STM32CubeIDE Cortex-M4 project you have RemoteProc/ that contains fw_cortex_m4.sh script used to load .elf

It is copied onto STM32MPU typically under /usr/local/projects/<your_project>_CM4/

You should be able to load your .elf launching this script:

cd /usr/local/projects/<your_project>_CM4/

fw_cortex_m4.sh start

Then, you have to update Linux in order to launch this script at boot time.

Best Regards,

Ludovic

srikanth
srikanthAuthor
Associate III
July 14, 2021

Thanks for the reply

1)Now i am able to start and run the M4 Processor through remote processor early boot.but i am unable to stop the M4 processor ,How can i do that?

2)How can i Allocate stack to Second A7 Processor in Uboot Level .

LudovicR
ST Employee
July 15, 2021

Hi @srikanth​ ,

You can stop the M4 processor using: ./fw_cortex_m4.sh stop

Not sure to get your second question, could you elaborate?

Best Regards;

LudovicR

srikanth
srikanthAuthor
Associate III
July 15, 2021

we are initializing all the peripherals in core 0(first A7) after that we are triggering a core 1(Second A7) by using Tamp registers Core 1 needs some stack to run the code . But I have a doubt i.e, how to allocate stack for for core 1.