2023-10-30 01:00 PM
Hi,
I'm using a STM32G07x1 that will need to receive firmware updates from an embedded Linux CPU. The only connection between these devices is an I2C bus so I plan to use the ROM I2C bootloader to handle updates.
I am aware of AN4221 that describes how to use the I2C bootloader commands, but are there any example scripts or C/C++ programs that demonstrate programming a STM32 MCU over I2C?
Thanks,
Josh
2024-03-08 07:33 AM
Josh, I am also trying to figure out how to do this. This document tells how to do it over CubeProg. If you can't find any other example, perhaps you could attach an I2C sniffer and record how ST is doing it. I am planning to do the same but won't have time for another month or two.
Charles
2024-03-08 07:41 AM
Hey Charles
I'm only trying to update via a Linux system so I ended up using the opensource stm32flash project (https://sourceforge.net/p/stm32flash/wiki/Home/). It has worked well for me. Just make sure you only try to flash using .hex or .bin binaries. It doesn't work with the default stm32cube .elf firmware.
Good luck!
Josh