Skip to content

The ultimate setup for pico w development on windows

Notifications You must be signed in to change notification settings

thewh1teagle/pico-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pico W Setup Guides

Table of Contents

Windows

macOS

Pico W MSYS2 🧩

The ultimate way to build for Pico W on Windows...

  1. Download msys2 from msys2.org

  2. Open MSYS2 UCRT64 terminal and execute setup script

git clone https://github.com/thewh1teagle/pico-setup
cd pico-setup
./setup
  1. Execute build script
./build

It will build and upload automatically.

That's it! 🎉

You ready to start your project...

Dive Deeper ✨

Upload with picotool manually

picotool reboot -f -u
picotool load -x main.uf2

Fix drivers for uploading with picotool

  1. Download zadig
  2. Select Option > List All Devices
  3. Select RP2040 (interface 1), may be different -> replace driver to libusb32

In case something went bad and you want to restore drivers:

  1. Hit win+r
  2. type devmgmt.msc and ENTER
  3. find the device and choose update device driver
  4. Choose "let me choose" and try to change it to something else

VSCode extensions for develop

vscode-serial-monitor

cpptools

Open ucrt64 from context menu

image

  1. 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"
  1. open it and apply

Open ucrt64 from windows terminal

  1. open windows terminal settings (top arrow -> settings)
  2. open json settings (left dropdown -> open JSON file)
  3. 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

Pico W macOS M1 🧩

The ultimate way to build for Pico W on macOS...

  1. 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
  1. 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
  1. Build time
cmake -B build -DPICO_BOARD=pico_w -DPICO_PLATFORM=rp2040
cmake --build build -- -j16
  1. Upload
picotool load build/app.elf 
  1. Monitor
serust --pid 000a

About

The ultimate setup for pico w development on windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published