GitHub Actions for STM32CubeIDE | Interrupt

In this article, we will explore how to use GitHub Actions to automate building STM32CubeIDE projects. Eclipse-based IDEs like STM32CubeIDE are often used for developing embedded systems but can be a little tricky to build in a headless environment.


This is a companion discussion topic for the original entry at https://interrupt.memfault.com/blog/github-actions-for-stm32cubeide

This would have been so good to see a few months ago! I had a long relationship with STM32CubeIDE, but it’s inherent weaknesses came to bother me more and more as I started to use it more professionally. The project structure can fall apart easily when cloned to another machine, leading to strange compilation errors and unnecessary debugging sessions. So I was very happy to see when ST recently came out with VSCode and CMake support in the last months, and I jumped on the opportunity to update my projects accordingly. STM32CubeMX can generate the necessary cmake project files (which do need some fine tuning), so integrating external libraries went from 15 minutes of configuring include paths and adding source folders with STM32CubeIDE, to a single line of cmake’s add_subdirectory(). Adding CI to the cmake project could not be more trivial, all it needs is the ARM GCC toolchain.