cancel
Showing results for 
Search instead for 
Did you mean: 

Installing the STM32CubeProgrammer without GUI

salmmike
Associate II

I have a Ubuntu 22.04 server I use for building Yocto distros for the STM32 MPUs. I would like to install the programmer on that so I could run some automated tests and flashing on my build images. Is it possible to install the software without the GUI installer?

6 REPLIES 6
Pavel A.
Evangelist III

Segger has a headless program & run utility for J-Link, very convenient for automated tests.

Would be nice to port it for OpenOCD, to use with st-links.

That reminds me that the stlink-tools package does exist as a default debian package. I guess that might be able to flash the linux images too. I'll need to look into that. Thanks for the comment!

Edit: seems like the stlink-tools package doesn't support flasing devices in the MPU series. OpenOCD has some support for them, but still trying to figure out if it can be used for flashing.

PatrickF
ST Employee

Hi @salmmike​ 

Note that on STM32 MPUs (STM32MP1x) family, the JTAG/SW port (e.g. connected to. STLINK) together with OpenOCD or any 3rd party like KEIL or IAR is only provided for debug purposes (i.e. STM32CubeIDE).

Unlike STM32 MCUs, you can't program external Flash using JTAG/SWD on STM32 MPUs.

With STM32CubeProgrammer, the connection to MPU products should be done using USB (UART as an alternative for test purpose as image size will end up to waiting ages).

About your question to install STM32CubeProgrammer without any Graphical interface during installation, I cannot answer.

You could probably ZIP a CubeProgrammer working installation on a local Ubuntu machine and copy it on your Ubuntu server. Might need some tweaks to have it working (e.g. DFU driver installation, paths, etc...).

For production grade programmer, you could also have a look to one of our authorized partner: https://www.elprotronic.com/pages/gangflasher-st

Regards.

In order 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.
AGill.4
Associate II

It is possible to do without a GUI, but you still need to acknowledge the license when downloading the package from the website and during installation. It's rather impractical to use when trying to install programmatically for CI and test infrastructure purposes. I just posted about this yesterday here https://community.st.com/s/question/0D53W00002FaDldSAF/can-stm32cubeclt-be-installed-with-programmatically-acknowledging-of-the-license

Ideally it could be downloaded without having to acknowledge the license on web and then use an environment variable setting to acknowledge it during installation.

All that said, check out the new STM32CubeCLT package. It is intended for what we are trying to do (except for that license acknowledgment pain) https://www.st.com/en/development-tools/stm32cubeclt.html

Thank you, this way I was able to install the STM32_Programmer_CLI on my machine. However when trying to install my linux distro on the STM32MP157F-DK2, the flashing ended on error :

Error: failed to download Segment[0]
Error: failed to download the File
Error: Download partition 0x10 failed
Error: TSV flashing service failed

Googling the issue gives results of others facing the same problem, which they seem to get fixed by installing the CubeProgrammer version 2.7. Unfortunately I was only able to go to version 2.12.0 or newer with the CLT package.

Edit with more info:

The failure happens when downloading the .ext4 partition, tested with the Programmer versions 2.12.0 and 2.13.0

As someone posted in another thread - ST-LINK cannot be used to flash STM32 MPUs. It only can be used for debugging.