STM32Cube Library – Part 3 Compiling

Okay, I’m finally going to finish this tutorial! This part will cover writing a Makefile to handle compilation and flashing code to the microcontroller.

This is the third part in a multi-part series.

Continue reading “STM32Cube Library – Part 3 Compiling”


STM32Cube Library – Part 2 Hello World

This is part 2 in a multi-part series. Read part 1 here: The STM32Cube library – part 1 Toolchain

We left off by generating a project in the STM32CubeMX application. Today we will modify the automatically generated code to do our bidding; namely blink several LEDs. This will also provide a tour of usage of the STM32Cube HAL library.

I will be using a stm32f4Discovery board for this tutorial, but it should work on most any other stm32 development board, just be sure to use the correct pins.

Continue reading “STM32Cube Library – Part 2 Hello World”

STM32Cube library – Part 1 Toolchain

This series of posts will hopefully help someone looking to set up and use the STM32Cube libraries provided by st-micro. This first post will cover setting up a development toolchain on a Linux system and the next post will cover making a hello world application.

What is this Cube library anyway?

The Cube library is a HAL (Hardware Abstraction Layer) developed by st-microelectronics to take some of the pain out of development with ARM microcontrollers. Their success in goal is debatable, but it does make porting code from other microcontrollers in their products easier. My main gripe is that it has a large memory footprint, and coming from the very space limited world of 8-bit microcontrollers I find the wastefulness annoying. That being said, I have come to use it as it considerably decreases my development time.

Continue reading “STM32Cube library – Part 1 Toolchain”