cancel
Showing results for 
Search instead for 
Did you mean: 

Example script/program for I2C bootloader commands

jbredbenner
Associate

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

2 REPLIES 2
CChic.1
Associate II

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

jbredbenner
Associate

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