stm32-cmake-cross-compile

Build and diagnose STM32 firmware cross-compilation with CMake and arm-none-eabi-gcc.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/51hhh/BU03 --skill stm32-cmake-cross-compile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stm32-cmake-cross-compile
Source: https://github.com/51hhh/BU03/tree/main/.github/skills/stm32-cmake-cross-compile
Command: npx skills add https://github.com/51hhh/BU03 --skill stm32-cmake-cross-compile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build and troubleshoot STM32 bare-metal firmware projects when CMake, MinGW Makefiles, or arm-none-eabi-gcc need to work together correctly.

Core Features & Use Cases

  • Cross-compiles STM32 firmware with a CMake-based workflow for TAG and ANCHOR role builds.
  • Diagnoses common build failures such as missing cache files, incomplete generated directories, and linker or compiler errors.
  • Explains build outputs like ELF, HEX, BIN, and MAP files so you can flash, debug, and inspect memory usage with confidence.

Quick Start

Use this skill to configure, rebuild, and troubleshoot my STM32 CMake project for the selected role.

Frequently Asked Questions about stm32-cmake-cross-compile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cross-compile STM32 firmware using CMake and arm-none-eabi-gcc?

To cross-compile STM32 firmware with CMake, you must execute a correct configure-and-build sequence using arm-none-eabi-gcc and MinGW Makefiles to generate the expected bare-metal build outputs.

Why does my STM32 CMake build fail with linker errors and missing generated directories?

STM32 CMake build linker errors and missing directories often stem from cache corruption or an incorrect configure-and-build sequence, requiring you to clear the cache and reconfigure the project properly.

What build outputs does CMake generate for STM32 bare-metal projects?

CMake generates ELF, HEX, BIN, and MAP files for STM32 bare-metal projects, providing the necessary outputs for flashing the device, debugging the code, and inspecting memory usage.

Can I use MinGW Makefiles to build different role configurations for STM32 projects?

Yes, you can use MinGW Makefiles with CMake to build and switch between different role configurations, such as TAG and ANCHOR roles, within your STM32 bare-metal firmware project.