2025-12-26 11:58 AM
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?
Solved! Go to Solution.
2025-12-26 1:30 PM
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
2025-12-26 12:05 PM
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?
2025-12-26 1:30 PM
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
2025-12-29 3:19 AM - edited 2025-12-30 3:33 AM
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.
2025-12-30 3:28 AM
@fghoussen It seems you have found a workaround with stlink-tools and st-flash ?
2025-12-30 6:06 AM
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