cancel
Showing results for 
Search instead for 
Did you mean: 

Installing STM32CubeProgrammer on Raspberry Pi

Ah.1
Associate II

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.

34 REPLIES 34
Rstua.1
Senior

 ...

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

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

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...

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

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.

RMora.4
Associate III

Another alternative to flashing STM32 from the Raspberry Pi over USB is by using JLink Software (JLinkExe docs). Since I work with other microcontrollers this works for me + JLink has ARM builds for most their software. I did this with my NUCLEO-L4R5ZI.

1. First reflash the st-link firmware to jlink firmware. Steps here.

2. Install JLink Software and Documentation Pack to the raspberry pi. This includes JLinkExe. You should then be able to run JLinkExe from command line. If not, you can create the symbolic links in /usr/bin from the install location, /opt for me.

3. Connect STM32 to Raspberry Pi and run JLinkExe.

4. Some of the commands you run from here require device name. You can find your ST device from list of supported ST devices.

5. From here you can flash with 'loadfile' command, erase flash with 'erase', or reset with 'r'.

This got me to a good start with flashing/erasing the board - beyond this I would reference the JLinkExe docs.

Any update on this?

We are automating the production to flash and test the devices using a jig with a raspberry pi.

@Houda GHABRI​ , ST could just publish the source code of the STM32CubeProgrammer so we could compile it for the architecture we need. It is a free software, ST doesn't make profit by selling it and that would help many of its customers!

Hello,

Can be the MacBook Pro with ARM processor Apple M1 Pro or Apple M1 Max be used as development machine for STM32CubeProgrammer?

Regards

Paul

Sam Ho
Associate II

Hi Everyone,

any updates on this, really want to be able to run STM32 Programmer CLI on a raspberry pi!!!

Thanks

Sam