Pico setup for Windows
This project aims to create an easy-to-use installer to get started on Windows (using the C/C++ SDK) with Raspberry Pi Pico and other RP2040-based boards. It is inspired by, and is roughly equivalent to, the pico-setup project for Linux systems.
The installer automates the prerequisite installation on Windows, as explained in the official Getting started with Raspberry Pi Pico guide.
The rest of this README document is about developing the installer itself. If you just want to install and use the compilers and toolchain, download the release linked to above. Further information for users is in the tutorial.
Included software
Building
You will need PowerShell 7.2 or newer in order to run the build script. See Installing PowerShell on Windows for download links and instructions. Note that this is needed only for building the installer itself, and not for end-user machines where the installer will be run.
The installers are built with NSIS 3. The NSIS script is generated by build.ps1 when provided with a JSON configuration file. The build script automatically downloads a local copy of NSIS to use for the build.
Only x86-64 builds are supported at this time.
Compiling OpenOCD and other tools (picotool, pioasm, elf2uf2) requires an installation of MSYS2. The build script automatically downloads and installs a local copy of MSYS2. You can specify a path to an existing copy of MSYS2 using the -MSYS2Path
option. The build script will install a copy of MSYS2 at this path if it doesn't find an existing copy.
It is highly recommended to use a dedicated copy of MSYS2 for this build.
To build:
.\build.ps1 .\config\x64-standalone.json -MSYS2Path ~\Downloads\msys64
The built installers will be saved to the bin
directory.
Tests
There are tests for some parts of the build scripts. You can run them like this:
Install-Module Pester -Force
Import-Module Pester -PassThru # Check the version of the imported module -- we need v5 or greater
Invoke-Pester -Output Detailed