Skip to main content
Ah.1
Associate
January 30, 2020
Solved

Installing STM32CubeProgrammer on Raspberry Pi

  • January 30, 2020
  • 19 replies
  • 16254 views

We've been succesfully using stm32flash in the past to flash our STM32 MCU that are attached to Raspberry Pi servers (no desktop or X). As we moved on to STM32G0 it seems that stm32flash is no longer working and we are forced to use STM32CubeProg to flash our firmware.

Is it possible to install STM32CubeProg on a) ARM such as RPI, b) server with no desktop?

To begin with, the installation instructions require the installation of OpenJFX which is not relevant (nor possible, in lieu of X) in this case, we intend to use only the CLI interface through scripts that perform the flashing.

Then, trying to run the installation script on the RPI fails since the provided installation binary is for x86.

Best answer by Houda GHABRI

Hi ,

It is not possible for the moment to install STM32CubeProgrammer on ARM processor.

There is plan to do it but unfortunately not in the near future.

regards,

Houda

19 replies

olivier
Associate
February 4, 2020

Hi,

I would also definitely like to see an ARM version of STM32CubeProgrammer (at least the CLI) that would run on Raspberry Pi (and STM32MP1).

@Khouloud GARSI​ @Nawres GHARBI​ is this something we can hope for in the near future?

Thanks

Olivier

AMiro.2
Visitor II
June 2, 2020

This is needed for me as well

TJaku.1
Associate
June 10, 2020

We would also like to use STM32_Programmer_CLI on Raspberry Pi.

KChud.1
Associate
June 16, 2020

HI,

I need in my some projects raspberry pi needs to program the stm32, so please provide some help for this.

CLI version is sufficient , please help me in this.

Houda GHABRI
Houda GHABRIBest answer
ST Employee
June 16, 2020

Hi ,

It is not possible for the moment to install STM32CubeProgrammer on ARM processor.

There is plan to do it but unfortunately not in the near future.

regards,

Houda

KChud.1
Associate
June 16, 2020

Thank you for prompt response.

Is there any other way or any cli file that I installed in raspberry and make this done?

Associate III
January 1, 2026

the possible way to write a bootloader and flash it initial memory of flash. In that enumerate I2C and connect I2C cables. Also write flash operation using i2c So through i2c you can do binary flashing to your MCU

AMiro.2
Visitor II
June 16, 2020

Try openocd. It works for me well.​

KChud.1
Associate
June 18, 2020

Hi, @AMiro.2​ 

I tried the openocd and its working for me. but stuck in RDP level 2 protection, can you please guide me how to add level 2 protection using openocd ? ​ 

Rstua.1
Senior
March 3, 2021

I don't think OpenOCD will work if you are programming over a USB connection. I think you need to have access to the JTAG pins.

So this may not be a good solution for a PRODUCTION line where the product with the STMicro Processor in inside a sealed case with only access to the USB port!

Rstua.1
Senior
March 3, 2021

 ...

Rstua.1
Senior
March 3, 2021

Has anyone successfully run STM32_Programmer_CLI on the Raspberry Pi using QEMU? I think you will also have to run the USB drivers from STMicro. Which makes this all the more obfuscated.

PADAM.1
Associate III
March 4, 2021

As stated by Houda Ghabri (ST Employee) above, there were no plans to port CubeProgrammer on Rasperry Pi.

To my opinion, from customer point of view this position is an error and should evolve.

OpenOCD is only a work around and I think it cannot support SBSFU (may be I am wrong and someone has done?)

Thus let's continue to ask...

Rstua.1
Senior
March 4, 2021

I had a sales rep recently infer after talking to STMicro that there is still a though that STMicro would port STM32_Programmer_CLI to and ARM type processor. I am interested in field upgrades using a Raspberry Pi. But can see a more general much more robust need for field upgrade tools running on an ARM processor if ARM based Android COTS computers and small form factor ARM based computers were included in the mix.

As it stands, no STMicro support for ARM based STM32 programming tools, we are considering writing our own boot loader and abandoning the STMicro's boot loader & USB driver (as I assume the STMicro USB driver just makes the over all upgrading process more obfuscated).

RMora.4
Associate III
August 7, 2021

How is the progress on this? Can I use the command line tool in STM32CubeProgrammer to flash an STM32 from a raspberry pi? If that's not possible what is the work around? Is there another utility that I can use? ST-LINK utility maybe? does this tool work on ARM? How about one of JLinks software like JFlash? Which I know definitely runs on ARM.

I noted a comment about openocd - I'll give this a shot.