The ultimate way to build for Pico W on Windows...
-
Download
msys2
from msys2.org -
Open
MSYS2 UCRT64
terminal and execute setup script
git clone https://github.com/thewh1teagle/pico-setup
cd pico-setup
./setup
- Execute build script
./build
It will build and upload automatically.
That's it! 🎉
You ready to start your project...
picotool reboot -f -u
picotool load -x main.uf2
- Download zadig
- Select Option > List All Devices
- Select RP2040 (interface 1), may be different -> replace driver to libusb32
- Hit
win+r
- type devmgmt.msc and ENTER
- find the device and choose update device driver
- Choose "let me choose" and try to change it to something else
- copy the following in new file
ucrt.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\mingw64]
@="MinGW UCRT64 Here"
"Icon"="\"C:\\msys64\\ucrt64.ico\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\mingw64\command]
@="C:\\msys64\\msys2_shell.cmd -defterm -where \"%V/\" -ucrt64"
[HKEY_CLASSES_ROOT\Directory\shell\mingw64]
@="MinGW UCRT64 Here"
"Icon"="\"C:\\msys64\\ucrt64.ico\""
[HKEY_CLASSES_ROOT\Directory\shell\mingw64\command]
@="C:\\msys64\\msys2_shell.cmd -defterm -where \"%V/\" -ucrt64"
- open it and apply

- open windows terminal settings (top arrow ->
settings
) - open json settings (left dropdown ->
open JSON file
) - search for
profiles
and add to profiles list the following
{
"guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
"name": "UCRT64 / MSYS2",
"commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64",
"startingDirectory": "C:/msys64/home/%USERNAME%",
"icon": "C:/msys64/ucrt64.ico",
"font":
{
"face": "Lucida Console",
"size": 9
}
}
Play with pico-examples
git clone https://github.com/raspberrypi/pico-examples --depth 1
cd pico-examples
cmake -B build .
cmake --build build blink -- -j16
picotool load -x build/blink/blink/uf2
The ultimate way to build for Pico W on macOS...
- Install toolchain
brew install gcc-arm-embedded
brew install picotool
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/thewh1teagle/serust/releases/download/v0.0.3/serust-installer.sh | sh
- Install Pico SDK
sudo mkdir -p /usr/local/share/pico-sdk
sudo chown $(whoami) /usr/local/share/pico-sdk
cd /usr/local/share/pico-sdk
git clone --recursive --depth 1 https://github.com/raspberrypi/pico-sdk.git .
export PICO_SDK_PATH=/usr/local/share/pico-sdk
echo 'export PICO_SDK_PATH=/usr/local/share/pico-sdk' >> ~/.zshrc
source ~/.zshrc
- Build time
cmake -B build -DPICO_BOARD=pico_w -DPICO_PLATFORM=rp2040
cmake --build build -- -j16
- Upload
picotool load build/app.elf
- Monitor
serust --pid 000a