clockfort / pico-setup-windows

Quickly get started with Raspberry Pi Pico/RP2040 on Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pico setup for Windows

Download the latest release

This project aims to create an easy-to-use installer to get started on Windows (using the C/C++ SDK) with the Raspberry Pi Pico microcontroller board, and possibly other RP2040-based boards as well. It is inspired by, and is roughly equivalent to, the pico-setup project for Linux systems.

The installers automate the prerequisite installation on Windows, as explained in the official Getting started with Raspberry Pi Pico guide. In addition, the installer offers to clone and build the Raspberry Pi Pico SDK for C/C++, along with some related repos which might be useful.

Documentation for end-users is in the ReadMe.txt file that is copied by the installer.

The installers attempt to install the required tools silently, without user intervention. The installers are configured with the recommended options from the official guide. For advanced users who wish to configure the software themselves, it might be better to download and install the software manually, or using a package manager.

Included software

Building

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.

Configuration files for x86 (32-bit) and x64 (64-bit) builds are provided.

Compiling OpenOCD 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 .\x64.json -MSYS2Path ~\Downloads\msys64
.\build.ps1 .\x86.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

Credits

RefreshEnv.cmd is from Chocolatey.

About

Quickly get started with Raspberry Pi Pico/RP2040 on Windows

License:Apache License 2.0


Languages

Language:PowerShell 76.7%Language:Batchfile 21.8%Language:Shell 1.5%