2025-04-25 3:52 AM - last edited on 2025-04-25 4:21 AM by mƎALLEm
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?
Solved! Go to Solution.
2025-04-26 6:01 PM
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.
2025-04-25 4:02 AM
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?
2025-04-25 4:14 AM - edited 2025-04-25 4:14 AM
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 AN4221, I2C protocol used in the STM32 bootloader.
2025-04-25 4:18 AM - edited 2025-04-25 4:23 AM
@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.
2025-04-26 12:48 PM - edited 2025-04-26 12:49 PM
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.
2025-04-26 6:01 PM
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.
2025-04-28 12:27 AM
@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 ?
2025-04-28 12:57 PM
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