STM32
STM32 — macOS Setup
Install STM32CubeIDE on macOS. The process is straightforward — download, install, and connect your NUCLEO board.
Prerequisites
- macOS 12 Monterey or later (Intel or Apple Silicon with Rosetta 2)
- A free st.com account
- At least 4 GB of free disk space
Apple Silicon compatibility note
As of 2025/2026, STM32CubeIDE runs on Apple Silicon Macs via Rosetta 2. If you don't have Rosetta installed, macOS will prompt you to install it when you first launch CubeIDE. This is normal and required.
Step 1 — Install Rosetta 2 (Apple Silicon Only)
If you're on an M1/M2/M3/M4 Mac, install Rosetta 2 first:
softwareupdate --install-rosetta --agree-to-license
Step 2 — Download STM32CubeIDE
- Go to st.com/en/development-tools/stm32cubeide.html
- Click Get Software and log in with your ST account
- Download "STM32CubeIDE-Mac" (the
.dmgfile)
Step 3 — Install STM32CubeIDE
- Open the downloaded
.dmgfile - Drag STM32CubeIDE to the Applications folder
- Eject the disk image
First launch — Gatekeeper bypass:
macOS may block the app because it's not from the App Store:
- Go to System Settings → Privacy & Security
- Scroll to the bottom — you'll see a message about STM32CubeIDE being blocked
- Click "Open Anyway"
- Confirm by clicking Open in the popup
Step 4 — Install Java (if needed)
STM32CubeIDE bundles its own JRE. If you see a Java error on first launch:
# Install Temurin JDK via Homebrew as a fallback
brew install --cask temurin
Step 5 — Launch and Configure
- Open STM32CubeIDE from Applications
- Choose a workspace directory (e.g.,
/Users/<you>/STM32CubeIDE/workspace) - Click Launch
Step 6 — Connect Your NUCLEO Board
- Connect your NUCLEO board via USB
- Open System Information (
Apple menu → About This Mac → System Report → USB) - Look for "STM32 STLink" — it should appear in the USB device list
In STM32CubeIDE, go to Help → ST-LINK Upgrade — your board's firmware version should appear.
Step 7 — Create a Blink Project
- File → New → STM32 Project
- In the Board Selector, search for your board (e.g.,
NUCLEO-F446RE) - Select it and click Next
- Name:
hello_blink, Language:C - Click Finish — CubeMX opens with the board configuration
Add blink code in Core/Src/main.c inside the while(1) loop:
1while (1)2{3 HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5); // Onboard LED (LD2)4 HAL_Delay(500); // 500ms delay5}Build with Cmd+B, then press F11 to flash and debug.
Step 8 — Serial Terminal on macOS
NUCLEO boards appear as a virtual COM port on macOS:
# Find the ST-LINK virtual COM port
ls /dev/cu.*
# Expected: /dev/cu.usbmodem14203 or similar
# Open with screen (built-in)
screen /dev/cu.usbmodem14203 115200
# Exit screen: Ctrl+A then K then Y
Or use the Serial Monitor extension in VS Code.
Troubleshooting
STM32CubeIDE shows "damaged and cannot be opened"
Run this in Terminal to remove the quarantine flag:
xattr -cr /Applications/STM32CubeIDE.app
Then try opening again.
NUCLEO not detected after connecting
- Check System Information → USB for the device
- Try a different USB cable (some USB-C hubs have compatibility issues with ST-LINK)
- Try connecting directly to the Mac's USB-A port or use a powered hub
"Unable to launch the debugger" error
This is usually a permissions issue. Open System Settings → Privacy & Security → Developer Tools and add STM32CubeIDE to the list.

