2025-01-22 09:08 PM
Hi,
I am working on STM32G491KCU6 board.
We are connecting STM to a linux based SoC via SPI. What we required is, we need to flash STM from SoC. We found stmflash binary which supports only through i2c and UART.
Is there any tool that support flashing via SPI?
Solved! Go to Solution.
2025-01-23 02:59 AM - edited 2025-01-23 03:08 AM
Again what do you mean by SoC? System On Chip? if yes need to provide more details on that part.
Yes STM32CubeProgrammer is for PC: Windows, Linux and MacOS.
If your "SoC" is another platform (not a PC) you need to develop your own tool based on the documentation I provided previously.
@abhijith_raj wrote:
We installed the below mentioned tool in Linux based SoC and copy STM32 binary to the soc and run this tool to flash the firmware to STM and it is working fine.
https://sourceforge.net/projects/stm32flash/
Need to contact the developer. All ST tools are available on ST website.
2025-01-23 12:45 AM
Hello @abhijith_raj and welcome to the community,
Not sure what do you mean by " we need to flash STM from SoC" then you asked "Is there any tool that support flashing via SPI?"
Meanwhile you can refer to this article on how to upload your application via SPI using STM32CubeProgrammer tool and STLINK-V3 probe.
Also you can refer to AN2606 "STM32 microcontroller system memory boot mode"
and
AN4286 "SPI protocol used in the STM32 bootloader"
To build your own programmer tool.
Hope that answers your question.
2025-01-23 01:10 AM
Hi @SofLit ,
We have 2 version of boards in which SoC and STM32 are connected via UART and in another it is via SPI.
In uart based version
We installed the below mentioned tool in Linux based SoC and copy STM32 binary to the soc and run this tool to flash the firmware to STM and it is working fine.
https://sourceforge.net/projects/stm32flash/
But in SPI based connection we couldn't find any tool for flashing.
STM32CubeProgrammer is for PC. right?
2025-01-23 02:59 AM - edited 2025-01-23 03:08 AM
Again what do you mean by SoC? System On Chip? if yes need to provide more details on that part.
Yes STM32CubeProgrammer is for PC: Windows, Linux and MacOS.
If your "SoC" is another platform (not a PC) you need to develop your own tool based on the documentation I provided previously.
@abhijith_raj wrote:
We installed the below mentioned tool in Linux based SoC and copy STM32 binary to the soc and run this tool to flash the firmware to STM and it is working fine.
https://sourceforge.net/projects/stm32flash/
Need to contact the developer. All ST tools are available on ST website.