Skip to main content
Visitor II
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

    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

    srikanthAuthor
    Visitor II
    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 .

    Technical Moderator
    July 12, 2021
    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

    srikanthAuthor
    Visitor II
    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 .

    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

    srikanthAuthor
    Visitor II
    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.