AZB-12 AN-20 · stm32-fix.notazizelse.xyz

← AZB-12 data sheet

Application note AN-20 · U20

STM32 Homebrew fix

2026 · stm32-fix.notazizelse.xyz
ABSTRACT

If you build CubeMX projects in VS Code on a Mac with Homebrew's arm-none-eabi-gcc, two things usually break: the toolchain has no newlib, and the Makefile points at a gcc without a sysroot. This script fixes both.

1From the README

STM32 project fix script for macOS.

Run this from any STM32CubeMX project directory generated for VS Code to fix the two most common build failures when using Homebrew arm-none-eabi-gcc:

  1. Updates .stm32env (used by STM32Make.make / STM32-for-VSCode extension) to point ARM_GCC_PATH at an ARM GNU Toolchain that bundles newlib.

  2. Patches the CubeMX-generated Makefile so the -isystem flag points at a gcc that actually has a sysroot (so #include_next resolves).