Gabe's Blog
Caution, this blog is extremely serious and important.
Title-STM32 Getting Started Date-2018/12/21
Other Keywords-
How to get started programming an STM32 microcontroller on Ubuntu 18.04.
No. Words-257 No. Figures-0 No. Mins-2

STM32 Getting Started

There are two primary pieces of software you’ll need to program an STM32 microcontroller. The first is called “STM32CubeMX” and is provided by ST to make it simpler to configure all of the clocks and peripherals and pins on the chip. Even better, it can generate Makefiles and boilerplate .c and .h files for you, across a variety of IDEs. The second piece of software you’ll need is OpenSTM32, which is a free Eclipse-based IDE for writing and flashing programs for your STM32 chip.

Installing CubeMX.

Your system likely didn’t come with Java already installed. So, install java first:

sudo apt install default-jre

The next step is to download STM32CubeMX. You’re likely running a 64-bit version of Linux. Don’t be fooled and try to run the STM32CubeMX installer ending in “.linux”. If you try to run it you’ll see:

unable to execute ./SetupSTM32CubeMX-4.27.0.linux: No such file or directory

As suggested by this link you can run the .exe version instead:

java -jar SetupSTM32CubeMX-4.27.0.exe

Follow the instructions and install.

Install OpenSTM32

Unfortunately you need to sign up for an account at in order to download OpenSTM32. Once you’ve done so, run


After it’s installed, I needed to edit ~/Ac6/SystemWorkbench/eclipse.bin.ini to add: right after -vm-args to get it to run successfully. Otherwise OpenSTM32 would crash after selecting a workspace. The contents of that file for me now looks like this: