2019-10-17 08:46 PM
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.
2019-10-17 10:55 PM
You can try ST's now-abandoned STLink Utility, or Seggers "JFlash Lite" tool.
The latter is installed with the Jlink JTAG drivers.
2019-10-17 11:18 PM
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.
2019-10-17 11:34 PM
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
2019-10-18 12:24 AM
> 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.
2019-10-18 01:55 AM
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?
2019-10-18 02:09 AM
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