Use this quick start for ST NUCLEO-L433RC-P, MCU STM32L433RC. The generated application is a standalone Cortex-M4 program using the board's ST-LINK connection.
1. Download the local tools and SDK
Install Arm GNU Toolchain, choosing the arm-none-eabi compiler, or use the compiler supplied by STM32CubeIDE. Install STM32CubeL4 and STM32CubeProgrammer.
If obtaining CubeL4 from Git, include submodules:
git clone --branch v1.18.1 --depth 1 --recurse-submodules --shallow-submodules https://github.com/STMicroelectronics/STM32CubeL4.git C:/SDKs/STM32CubeL4
The SDK root must contain Drivers/CMSIS/Device/ST/STM32L4xx/Include/stm32l433xx.h. The compiler bin directory must contain arm-none-eabi-gcc.exe. The script can also discover the usual CubeIDE and STM32Cube repository locations automatically.
2. Build locally first
Extract the generated Nucleo ZIP. In Windows PowerShell, from that project's root:
.\build.ps1 -CubeL4Path C:/SDKs/STM32CubeL4 -GccBin C:/Tools/ArmGNU/bin
Substitute your actual SDK and compiler directories, or omit an option when automatic discovery works. Output is build/meter.elf, meter.hex, meter.bin and meter.map. Stop on a compiler or linker error; there is no valid new firmware to program until the build succeeds.
3. Docker fallback
If the local compiler is missing, keep the CubeL4 SDK and create the Arm Docker image. No Windows compiler is needed for this route.
From the extracted project directory, in Windows PowerShell:
$projectDir = (Get-Location).Path
$cubeSdk = (Resolve-Path C:/SDKs/STM32CubeL4).Path
docker run --rm -v "${projectDir}:/project" -v "${cubeSdk}:/sdk:ro" meterstudio-arm:local -File ./build.ps1 -CubeL4Path /sdk -GccBin /opt/arm/bin
For native Linux, the equivalent build is:
docker run --rm -v "$PWD:/project" -v /opt/sdks/STM32CubeL4:/sdk:ro meterstudio-arm:local -File ./build.ps1 -CubeL4Path /sdk -GccBin /opt/arm/bin
Replace the SDK path with your own. The result is the same build/meter.elf on the host.
4. Program and verify
Connect the Nucleo's ST-LINK USB port. Close Director/serial monitors. On Windows, list probes using the installed programmer:
& 'C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe' -l
Copy the serial number of the intended NUCLEO-L433RC-P probe, then run:
.\flash.ps1 -ProbeSerial YOUR_STLINK_SERIAL
If CubeProgrammer is installed elsewhere, add -Programmer C:/Tools/STM32CubeProgrammer/bin/STM32_Programmer_CLI.exe. The script programs the ELF, verifies it and resets the MCU. This same host flash step works after a Docker build and requires no host compiler.
Entire flash step inside Docker on native Linux
The Arm image includes OpenOCD. Use lsusb on the host to identify the ST-LINK USB device and replace the example device node and probe serial:
docker run --rm --device=/dev/bus/usb/001/004 -v "$PWD:/project" --entrypoint openocd meterstudio-arm:local -f interface/stlink.cfg -c "hla_serial YOUR_STLINK_SERIAL" -f target/stm32l4x.cfg -c "program build/meter.elf verify reset exit"
Wait for successful program/verify output. The device node can change after reconnecting USB. On Windows Docker Desktop, use the Windows flash script above unless USB/IP has been configured separately.
5. Connect and update
Select the ST-LINK Virtual COM Port in Director. The firmware uses LPUART1 TX PA2 / RX PA3; default HDLC settings are 9600, 8N1, no flow control, server address 1. Public SAP 16/None is read-only. Minimum uses SAP 32/Low for writes; Minimum-high and Minimum-gmac use their own authenticated association settings.
Ordinary updates repeat build and flash using the new ELF. Do not mass erase. The final 16 KiB at 0x0803C000–0x0803FFFF holds settings. GMAC builds additionally reserve 0x08038000–0x0803BFFF for counters; preserve those counters together with their keys and system title. Exported passwords/keys are omitted by default, so provision them or explicitly include test secrets before generating a board image.
Return to Build.