Showing results for 
Search instead for 
Did you mean: 

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


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.

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 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 and

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


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.