cancel
Showing results for 
Search instead for 
Did you mean: 

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

srikanth
Associate III

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.

7 REPLIES 7
Olivier GALLIEN
ST Employee

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
Associate III

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
ST Employee

Hi @srikanth​ ,

I recommend that you read few other wiki pages

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2

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

Regards.

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.
LudovicR
ST Employee

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

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

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

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.