This is a forked repo of the pico set for windows. It is ment to set up the pi pico for robomasters so some repos and dependenceys wont be installed.
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.
- Arm GNU Toolchain
- CMake
- Ninja
- Python 3.9
- Git for Windows
- Visual Studio Code
OpenOCDno need cuz of this
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.
A good NSIS guide and power shell guide
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 enable running power shell: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Check powershell version: $PSVersionTable.PSVersion
To build:
.\build.ps1 .\config\x64-standalone.json -MSYS2Path ~\Downloads\msys64 -SkipSigning
The built installers will be saved to the bin
directory.
- ConfigFile: (first arg and flag not needed) path to .\config\x64-standalone.json file
- MSYS2Path: path to msys64
- SkipSigning: Skip signing exe step(recomend) turn on if you dont know what signing is
- Compression: zlib, bzip2, lzma(default)
- BuildType: default system
build.ps1
will download and build all .exe files like picotool, git, etc.
x64-standalone.json
has all the git repos and links to where build will
download from. Then as a masive string build will make a .nsi
file and
compile it to the .exe
you see in the \bin
directory. Then when running
the .exe
it will download all tools lised in included software and then ask to run
pico-setup.cmd
to clone and update
the sample_rm_pico_app repo.
if you just need to change the nsi file it is faster to just change the file in the root dir and compile it with this:
.\build\NSIS\makensis ".\$basename-$suffix.nsi"
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