cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 flashing tool on ARM Linux via i2c

abhijith_raj
Associate III

Hi,
I'm looking for an STM32 flashing tool that runs on ARM Linux for use on an embedded board. In our setup, I have a processor and an STM32G491RET microcontroller connected via I2C.

Now I need a command-line tool that can run on the processor to flash the MCU over I2C.

Is there any tool available that supports this use case?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Perhaps check on stm32flash, that used to support early I2C

https://github.com/ARMinARM/stm32flash

https://github.com/stm32duino/stm32flash?tab=readme-ov-file

If you're a software engineer, perhaps review AN4221 and code a solution

AN3155 is for the UART protocol, examples for that can be found on GitHub, for example the Arduino MKR WAN 1300 board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

7 REPLIES 7
mƎALLEm
ST Employee

Hello,

The only flashing tool available from ST is the STM32CubeProgrammer and unfortunately it's not supported by ARM architecture host according to this thread: Support for arm linux?

 

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.

Is there any intention to support it on ARM-based Linux?

Any update/progress on the internal ticket 176491 mentioned by @Maryem  here?

 

As I said there, it could be quite useful - and the request does keep coming up ...

 

@abhijith_raj - meanwhile, the I2C bootloader protocol is described in Application Note AN4221I2C protocol used in the STM32 bootloader.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Andrew Neil wrote:

Is there any intention to support it on ARM-based Linux?

Any update/progress on the internal ticket 176491 mentioned by @Maryem  here?


Checking the internal progress on that ticket: no news. 

Escalated this request too.

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.
Pavel A.
Super User

CubeProgrammer does not support I2C interface, even on x64. So find or make a custom tool. Here you can find help for creating a custom tool.

 

Perhaps check on stm32flash, that used to support early I2C

https://github.com/ARMinARM/stm32flash

https://github.com/stm32duino/stm32flash?tab=readme-ov-file

If you're a software engineer, perhaps review AN4221 and code a solution

AN3155 is for the UART protocol, examples for that can be found on GitHub, for example the Arduino MKR WAN 1300 board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Tesla DeLorean wrote:

AN3155 is for the UART protocol, examples for that can be found on GitHub, for example the Arduino MKR WAN 1300 board.


Would that also be in STM32Duino: https://github.com/stm32duino/Arduino_Core_STM32 ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

It might, but it's all getting a big old, I couldn't surface anything that recent and I2C, and stm32flash was definitely iterated for the USART protocol originally.

The MKR WAN variant was designed more for integration into an MCU project than a Linux or Win32 application. It targeted a STM32L072/L082 

The I2C connectivity also tends to point to an MCU project. So basic familiarity with I2C protocols should give a foundation just to implement the mechanics expressed in AN4221

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..