STM32CubeCLT with CMake and GNU ARM toolchain for STM32 development
2.8K
![]() |
STM32CubeCLT Version Build Status
|
A Docker image providing a headless CI/CD environment for STM32CubeCLT (STMicroelectronics Command Line Tools). Each image ships with STM32CubeCLT pre-installed — ready to use immediately with no runtime installation required.
Note: STM32CubeCLT is fully installed during the Docker build process. The container starts instantly with all tools ready to use.
Once the container is running, use CLI commands to build and program your STM32 projects.
Build with CMake:
docker run -it -v $(pwd):/workspace uoohyo/stm32-cmake:latest bash -c "
cd /workspace/your-project
mkdir -p build && cd build
cmake .. -G Ninja
ninja
"
Compile with Make:
docker run -it -v $(pwd):/workspace uoohyo/stm32-cmake:latest bash -c "
cd /workspace/your-project
make
"
Generate code with STM32CubeMX:
docker run -it -v $(pwd):/workspace uoohyo/stm32-cmake:latest bash -c "
cd /workspace
STM32CubeMX -q your-project.ioc
"
Program STM32 device:
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb \
-v $(pwd):/workspace uoohyo/stm32-cmake:latest bash -c "
STM32_Programmer_CLI -c port=SWD -w firmware.hex -v -rst
"
Pull a version-specific image from Docker Hub:
docker pull uoohyo/stm32-cmake:1.16.0
Or use the latest:
docker pull uoohyo/stm32-cmake:latest
Run the container:
docker run -it -v $(pwd):/workspace uoohyo/stm32-cmake:1.16.0
See docs/versions.md for all available versions.
This project uses a two-step build process where the STM32CubeCLT installer is downloaded by GitHub Actions before Docker build.
For local builds, you need to download the installer manually:
Download STM32CubeCLT from st.com (requires free ST account)
Place the .zip file in cubeclt_download/ directory
Build the image:
mkdir -p cubeclt_download
# Place your downloaded .zip file in cubeclt_download/
docker build --build-arg CUBECLT_VERSION="1.16.0" -t stm32-cmake:local .
| Component | Description |
|---|---|
| STM32CubeMX | STM32 initialization code generator |
| STM32CubeProgrammer | STM32 programming and debugging tool |
| GNU ARM Toolchain | arm-none-eabi-gcc for ARM Cortex-M compilation |
| CMake | Build system generator |
| Ninja | Fast build system |
| Git | Version control |
GitHub Actions:
name: Build STM32 Firmware
on: [push]
jobs:
build:
runs-on: ubuntu-latest
container:
image: uoohyo/stm32-cmake:latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
mkdir -p build && cd build
cmake .. -G Ninja && ninja
GitLab CI:
build:
image: uoohyo/stm32-cmake:latest
script:
- mkdir -p build && cd build
- cmake .. -G Ninja && ninja
Contributions are welcome! Whether it's bug reports, feature requests, version bumps, or documentation improvements — feel free to open an issue or pull request.
This project is maintained by uoohyo.
Copyright (c) 2026 uoohyo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Content type
Image
Digest
sha256:ab865ab15…
Size
1.7 GB
Last updated
2 months ago
docker pull uoohyo/stm32-cmakePulls:
213
Last week