cancel
Showing results for 
Search instead for 
Did you mean: 

Support for arm linux?

koendv
Associate II

Hi. I have a request.

Is it possible to compile STM32CubeProg for arm linux?

Right now it is possible to compile firmware for stm32 on arm linux using the stm32duino toolchain from ST.

However, the STM32CubeProg is only available on intel linux.

This means we can compile firmware on an arm system such as Raspberry Pi 4, but there is no official tool to upload the firmware.

Note I'm not asking for the whole STM32Cube IDE - just the STM32CubeProg cli would be sufficient.

8 REPLIES 8
berendi
Principal

Not "official" of course, but OpenOCD works just fine. BTW, in what way is stm32duino "official"?

It's even possible to flash the firmware directly through the I/O pins without ST-Link

https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi

Houda GHABRI
ST Employee

Hello @KDe V.1,

STM32CubeProgrammer is not supported on ARM architecture host .For linux only x86 architecture is supported .

best regards,

Houda

DSche.2
Associate

Hi all

I will pick up this queastion again: is the STM32CubeProg cli now available for ARM based Linux?

kind regards

Dominik

koendv
Associate II

You can run STM32CubeMX and STM32Cubeprogrammer on raspberry pi; probably on any arm64 linux.

STM32CubeMX

Check java is installed:

pi@raspberrypi:~ $ java --version

openjdk 11.0.15 2022-04-19

OpenJDK Runtime Environment (build 11.0.15+10-post-Debian-1deb11u1)

OpenJDK 64-Bit Server VM (build 11.0.15+10-post-Debian-1deb11u1, mixed mode)

Download stm32cubemx for linux:

pi@raspberrypi:~ $ ls -l en.stm32cubemx-lin_v6-5-0.zip 

-rw-r--r-- 1 root root 414664915 May 16 17:35 en.stm32cubemx-lin_v6-5-0.zip

Unzip and install:

pi@raspberrypi:~ $ mkdir zzz

pi@raspberrypi:~ $ cd zzz/

pi@raspberrypi:~/zzz $ unzip -q ../en.stm32cubemx-lin_v6-5-0.zip 

pi@raspberrypi:~/zzz $ ls

jre Readme.html SetupSTM32CubeMX-6.5.0

pi@raspberrypi:~/zzz $ java -jar ./SetupSTM32CubeMX-6.5.0

Run STM32CubeMX from the installation directory:

pi@raspberrypi:~/zzz $ cd ~/STM32CubeMX/

pi@raspberrypi:~/STM32CubeMX $ ls 

db  jre  plugins   third_parties_plugins utilities

help olddb STM32CubeMX Uninstaller

pi@raspberrypi:~/STM32CubeMX $ java -jar ./STM32CubeMX

 0693W00000NqHpqQAF.jpgSTM32Cubeprogrammer

  • Install box64 on your raspberry. Your raspberry needs to be running the 64-bit version of raspberry pi os.
  • Install STM32CubeProgrammer for linux on an X86_64 system
  • Copy the installation directory from x86_64 linux to your raspberry.
  • Try the command-line version of STM32CubeProgrammer; e.g. as in attached file.
cd STM32CubeProgrammer/
./bin/STM32_Programmer_CLI

HTH

>It's even possible to flash the firmware directly through the I/O pins without ST-Link

is possible but i dont recommend, very glitchy bitbanging of SWD protocol by raspi.

we dont need to firmware by ourselves, lets talk

Dear Houda,

Next year I expect to produce thousands of PCBs for a number of physics experiments in Europe. These boards use original ST chips of the STM32H7 series, bought through one of the official distributors. That is, I am a legit ST customer.

I am designing a programming and testing rig to be used for post-assembly Quality Control for the PCBs, and having the possibility to run the STM32CubeProg on a Raspberry would be very useful, as the device is small and would easily fit in the assembler company's benches. Unfortunately ST does not release an official install package for that architecture at the moment.

 

ST should seriously consider providing a binary for arm64 Debian-based Linux distributions like Raspberry OS and Ubuntu, at least for the STM32CubeProg, if not also for the STM32CubeIDE. Single-board computers and Apple Mac use arm64 chips and are already very popular. ST should keep the edge it has had for many years in terms of ease of use of its dev tools and make its software available for these new platforms.

I fully understand you cannot take these decisions on your own, but can you bring this up as a customer feedback in your company unit?

Cheers,
Luigi

How are you programming them? Must you use JTAG/SWD? Or can you use the DFU or UART methods. Or others described in AN2606

The UART protocol is well described in AN3155, and basically just requires an MCU with a UART to implement, or payload from.   https://github.com/arduino-libraries/MKRWAN/tree/master/examples/MKRWANFWUpdate_standalone

If you must approach as JTAG/SWD, perhaps look a OpenOCD, or CMSIS-DAP as a vehicle to using the ARM protocols and methods to push code and data into the devices. STM32CubeProgrammer has .ELF loaders it pushes into RAM to facilitate the FLASH methods of the different MCU parts/families

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

And let's not forget about Segger.