cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer software for Raspberry Pi (raspian 64 bit ARM)

fghoussen
Associate II

I'd like to use a STM32 Nucleo from my raspberry pi  (raspian 64 bit ARM).

From my x86 PC I use this https://www.st.com/en/development-tools/stm32cubeprog.html#st-get-software and download the linux version of the tools: this works.

 

The same version doesn't work on raspberry pi as it's arm64 based: I get an " cannot execute binary file: Exec format error" error. I found no version of stm32cubeprog for raspberry pi arm on the STM web site (I tried macos arm version but get the same error than when setting up the linux version of the tool).

 

Is there a way to get stm32cubeprog to work on raspberry pi  (raspian 64 bit ARM) ? How and where to get binaries? 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

There is no plan for STM32CubeProgrammer to support the Raspberry Pi architecture.

Some discussion here:

Solved: Installing STM32CubeProgrammer on Raspberry Pi - STMicroelectronics Community

Solved: How to install STM32CubeProgrammer on Raspbian? - STMicroelectronics Community

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

5 REPLIES 5
fghoussen
Associate II

Seems for a given flavor of STM32CubeProgrammer (say linux, latest version) there is no way to ask for x86 or arm binaries. I need STM32CubeProgrammer for linux + arm. How to find it?

TDK
Super User

There is no plan for STM32CubeProgrammer to support the Raspberry Pi architecture.

Some discussion here:

Solved: Installing STM32CubeProgrammer on Raspberry Pi - STMicroelectronics Community

Solved: How to install STM32CubeProgrammer on Raspbian? - STMicroelectronics Community

 

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Super User

As @TDK suggests, this is a frequently recurring question:

STM32CubeProgrammer on Raspberry Pi (or other ARM-based Host).

Edited to correct link.

 

There are some suggestions for alternatives in that thread...

PS: Including using J-Link.

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
Super User

@fghoussen It seems you have found a workaround with stlink-tools and st-flash ?

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.

I had no time yet to test with more complex app, but I got a minimal blinky app (using embedded LED) to be flashed OK from RPi and to run OK (change sleep time when building works as expected) on the STM chip connected to the RPi.

Here is how I did if this may help other readers:

>> sudo apt update

>> sudo apt install openocd

>> sudo apt install stlink-tools

>> sudo usermod -aG plugdev $USER # Allow the user to flash. Must be done once + logout / login.

>> lsusb | grep ST-LINK # Plug the USB cable that is connected to the STM: check the STM is seen.

Bus 001 Device 003: ID 0483:374b STMicroelectronics ST-LINK/V2.1

>> st-flash --connect-under-reset write build/zephyr/zephyr.bin 0x08000000

You need to make sure (from the datasheet) that 0x08000000 is the correct address associated to the bank of your chip.

HTH