2020-03-18 02:13 AM
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.
2020-03-18 02:40 AM
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
2020-03-18 09:10 AM
Hello @KDe V.1,
STM32CubeProgrammer is not supported on ARM architecture host .For linux only x86 architecture is supported .
best regards,
Houda
2022-05-13 06:55 AM
Hi all
I will pick up this queastion again: is the STM32CubeProg cli now available for ARM based Linux?
kind regards
Dominik
2022-05-19 09:21 AM
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
STM32Cubeprogrammer
cd STM32CubeProgrammer/
./bin/STM32_Programmer_CLI
HTH
2022-05-19 11:42 PM
>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.
2023-12-19 01:33 PM
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
2023-12-19 01:57 PM
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
2023-12-19 02:35 PM
And let's not forget about Segger.