cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 (engineering mode) - How to program the cortex m4 firmware from the command line?

ufo2ofu
Associate

In engineering mode (BOOT0:off, BOOT2:On) I want to update my cortex-m4 firmware from CMD, not an IDE. 

What is the command to do so?

Thank you!

Note: I tried using the STM32_Programmer_CLI executable but it keeps seeing the a7 only, I cant communicate with the m4.

Note: I think the IDE uses OpenOCD to do so but I can't find how to extract the command line it uses.

1 REPLY 1
PatrickF
ST Employee

Hi @ufo2ofu​ 

Engineering mode could only be used with debuggers using JTAG/SWD.

You could probably load Cortex-M4 FW using openOCD, but I have no information how to do it.

It would be much straightforward using CubeIDE (see example in https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4) or 3rd party IDE/debuggers (e.g. Keil, IAR, Lauterbach)

Please note that there is no embedded flash in STM32MP1 (FW is running from internal RAM only), so, in a running platform, the Cortex-M4 firmware is loaded from external Flash in SRAMs by uBoot or Linux (See https://wiki.st.com/stm32mpu/wiki/Boot_chain_overview#STM32MP15_boot_chain and https://wiki.st.com/stm32mpu/wiki/Linux_remoteproc_framework_overview#Remote_processor_boot).

Note that for STM32MP1 series, CubeProgrammer is only using USB (or UART) to connect to the platform and this is not available in Engineering mode (See https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Let%27s_start/Populate_the_target_and_boot_the_image).

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.