cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload Cortex-M4 FW without IDE?

dimax
Senior

I'm working with Development Kit and want to upload my Cortex-M4 image but I do not want to use IDE. I assume there should be a Linux program that can stop M4, write image into SRAM and restart M4.

Where can I find a details on how to do it?

Thanks.

6 REPLIES 6
Ozone
Lead

You can try ST's now-abandoned STLink Utility, or Seggers "JFlash Lite" tool.

The latter is installed with the Jlink JTAG drivers.

dimax
Senior

Thanks but this is not good for us.

We are developing our own board based on STM32MP1. We can not afford keep STLink or JTag on board. We also want to be able to upgrade FW without physical connection to the board, except network of course.

Architecturally MPU can stop MCU, upload image and start/restart it. Actually this is what it does at boot time. But I can't find the way to change the FW image and force FW reload and MCU restart without reseting the whole board.

PatrickF
ST Employee

Hello,

I think what you want is Linux remoteproc framework

see https://wiki.st.com/stm32mpu/index.php/Coprocessor_management_overview

and https://wiki.st.com/stm32mpu/index.php/Linux_remoteproc_framework_overview

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.

> We can not afford keep STLink or JTag on board.

You don't need a debug pod (STLink or JLink) on-board. Just the connector, wiring to the JTAG pins.

> Architecturally MPU can stop MCU, upload image and start/restart it. Actually this is what it does at boot time. But I can't find the way to change the FW image and force FW reload and MCU restart without reseting the whole board.

So, you basically know already where to look.

If you want do download new M4 firmware via MPU, there is (IMHO) no way around digging into the datasheets / reference manuals and the existing firmware.

dimax
Senior

Thanks Patrick. If you say this is the official way to do it I will start looking deeper into it. I was sure there is something more simple.

One additional question.

Where the M4 image is stored in the file system and how is it loaded at the boot time?

My assumption is that the image is stored as a file in known place and U-boot or part of the Kernel is loading it at the boot time and starts MCU. Am I right?

The firmware components are stored in the file system, by default in the /lib/firmware/ folder.

see Remote processor boot through sysfs

The load is done using the kernel.

uBoot could also be used to have faster M4 startup. See https://wiki.st.com/stm32mpu/index.php/How_to_start_the_coprocessor_from_the_bootloader

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.