To get MicroPython running (and “readable” via REPL) on an [STM32](https://www.ampheo.com/search/STM32) Nucleo-64, you mainly do three things: pick the right firmware for your exact Nucleo model → flash it via ST-LINK → open the REPL over the ST-LINK Virtual COM Port. ![maxresdefault (81)](https://hackmd.io/_uploads/r1_80AiX-x.jpg) **1) Confirm your exact Nucleo model is supported** Look at the silkscreen on the PCB (e.g., [NUCLEO-F401RE](https://www.onzuu.com/product/stmicroelectronics-nucleo-f401re-3236041), [NUCLEO-F411RE](https://www.onzuu.com/product/stmicroelectronics-nucleo-f411re-3213679), [NUCLEO-F446RE](https://www.onzuu.com/product/stmicroelectronics-nucleo-f446re-3235536), etc.). MicroPython supports a set of STM32 Nucleo boards (list on MicroPython’s STM32 page). If your exact board isn’t listed, you’ll likely need to build MicroPython yourself—but many popular Nucleo-64 boards are supported. **2) Download the correct MicroPython firmware for that board** Go to MicroPython’s board download page for your model (example: NUCLEO_F401RE) and download the provided .hex or .bin firmware. **3) Flash MicroPython using the built-in ST-LINK (recommended)** [Nucleo boards](https://www.onzuu.com/search/Nucleo) typically include a built-in ST-LINK debugger/programmer, and MicroPython’s download pages document the common flashing methods. **Option A: st-flash (Linux/macOS/WSL)** ``` st-flash erase st-flash write firmware.bin 0x08000000 # or: st-flash --format ihex write firmware.hex ``` **Option B: STM32CubeProgrammer (Windows/macOS/Linux)** CLI example: `STM32_Programmer.sh -c port=SWD -d firmware.hex -hardRst` **4) Open the MicroPython REPL via ST-LINK “Virtual COM Port”** Most Nucleo-64 boards can present a Virtual COM Port over the ST-LINK USB connection ([ST](https://www.ampheo.com/manufacturer/stmicroelectronics) mentions needing the ST-LINK/V2-1 driver on Windows). By default on many Nucleo-64 boards, USART2 (PA2/PA3) is routed to ST-LINK for that virtual COM port using solder bridges: * SB13 & SB14 ON * SB62 & SB63 OFF Then connect with a serial terminal to the new COM port (commonly 115200 8-N-1). **5) Use mpremote to “talk to” MicroPython and upload/run code** Install and open REPL: ``` pip install --user mpremote mpremote ``` mpremote is the official MicroPython tool to interact over serial and manage files. Common commands: ``` mpremote fs ls mpremote fs cp main.py : mpremote run your_script.py ``` **Quick sanity check (in REPL)** ``` import sys print(sys.implementation) ``` **If it doesn’t work (fast checks)** * No COM port on Windows: install the ST-LINK/V2-1 driver first. * No REPL text: confirm the USART routing bridges are in the default VCP configuration (SB13/SB14 vs SB62/SB63). * Wrong firmware: make sure the firmware matches your exact Nucleo model.