14 November 2013
As part of Input Devices week in MAS.863 How To Make Almost Anything I wanted to work with the STM32 microcontroller, and had a STM32F3 Discovery board provided by the class. I spent almost two days trying to figure out how to compile and run programs on the device using my Mac. Frustrated by other guides to getting STM32 development working I decided to make my own.
First, install homebrew if you don’t have it already:
I wrote two simple homebrew formulae for the components needed to compile and run code on the STM32.
To install:
This installs a GCC compiler for ARM along with STLink, a great utility which manages a connection with the STLink JTAG programmer. It broadcasts a gdb server on port 4242 that you can use to control the STM32.
Now everything is ready to load and run a program.
In one terminal tab, run st-util
Introduction to Cortex-M and STM32 microcontrollers. How to setup a complete and working tool-chain to develop STM32 applications on Windows, Linux and Mac OSX. How to use STM32CubeMX to generate application skeleton, and how to import it inside the tool-chain. Introduction to OpenOCD and to the debugging of STM32 applications. ARM semihosting. Getting Started With Stm32 Using Arduino IDE: STM32 Is quite powerful and popular board supported by Arduino IDE.But to use it you need to install the boards for stm32 in Arduino IDE so in this instructables i'll tell how to install stm32 boards and how to program it.
- For those that want to set up the STM33duino using the STM32 Cores on a Mac running Mojave (10.14) here is what worked for me. Follow the excellent instructions at.
- Trusted Windows (PC) download STM32 ST-Link Utility 4.5.0. Virus-free and 100% clean download. Get STM32 ST-Link Utility alternative downloads.

In another terminal tab, run arm-none-eabi-gdb
In GDB you need to connect to the STLink server:
Now you can load firmware and run it.
If you are new to the STM32 I have an example project on GitHub.
Stm32 For Arduino
