Everything in this file comes from the Getting started with Raspberry Pi Pico for C/C++ development guide. This file contains all of the same content, just organized into an enumerated list.
- During installation, make sure to tick the box to register the path to the ARM compiler as an environment veraible in the Windows shell when prompted to do so. See the image below.
- When prompted, add CMake to the system
PATH
for all users.
- When prompted by the Built Tools for Visual Studio installer, you need to install the C++ build tools only.
- You must install the full "Windows 10 SDK" package as the SDK will need to build the
pioasm
andelf2uf2
tools locally. Removing it from the list of installed items will mean that you will be unable to build Raspberry Pi Pico binaries.- This takes a while.
- When prompted by the installer, add Python 3.7 to the system
PATH
for all users.
- You should be additionally disable the
MAX_PATH
length when prompted at the end of the installation.- When installing, choose 'Custom installation,' click through 'Optional Features' and then under 'Advanced Features' choose 'Install for all users'
- It is possible that you will need to make a symbolic link so that the Makefile can find Python 3. To do so, type
cmd
in the Run Window so that the Developer Command Prompt icon appears in the Start Menu. Select the small arrow to the right of the icon, and then select "Run as administrator." Navigate toC:\Program Files\Python37
and make a symlink by running
C:\Program Files\Python37 > mklink python3.exe python.exe
Only do this if your build fails because Make can't find your python installation.
- Install Git.
When prompted by the installer, make sure that you change the default editor away from
vim
(see below)Tick the checkbox to allow Git to be used from third-party tools.
- Check the box "Checkout as is, commit as-is" (unless you have a strong reason not to)
- Select "Use Windows' default console window"
- Select "Enable experimental support for pseudo consoles"
C:\Users\vha3\Pico
C:\Users\vha3\Pico> git clone -b master https://github.com/raspberrypi/pico-sdk.git
C:\Users\vha3\Pico> cd pico-sdk
C:\Users\vha3\Pico\pico-sdk> git submodule update --init
C:\Users\vha3\Pico\pico-sdk> cd ..
C:\Users\vha3\Pico> git clone -b master https://github.com/raspberrypi/pico-examples.git
Windows > Visual Studio 2019 > Developer Command Prompt
C:\Users\vha3\Pico
.C:\Users\vha3\Pico > setx PICO_SDK_PATH "..\..\pico-sdk"
Windows > Visual Studio 2019 > Developer Command Prompt
. Closing/re-opening will set the environment variable that we configured above.pico-examples
folder. For me, this was in the directory C:\Users\vha3\Pico\pico-examples
C:\Users\vha3\Pico> cd pico-examples
C:\Users\vha3\Pico\pico-examples> mkdir build
C:\Users\vha3\Pico\pico-examples> cd build
C:\Users\vha3\Pico\pico-examples\build> cmake -G "NMake Makefiles" ..
C:\Users\vha3\Pico\pico-examples\build> nmake
build
directory, you will now find a hello_world
directory. You will find directories for each of the other example projects too. These folders will contain the ELF, bin
, and uf2
target files for each project. The uf2
target file can be dragged-and-dropped directly onto an RP2040 board attached to your PC via USB, as explained in the next section.BOOTSEL
button, plug the Pico into a USB port.C:\Users\vha3\Pico\pico-examples\build\blink.uf2
to the Pico, as you would if you were moving a file to a flash drive.Windows > Visual Studio 2019 > Developer Command Prompt
C:\Users\vha3\Pico > code
. This will open Visual Studio Code with all of the correct environment variables set so that the toolchain is correctly configured.Ctrl + Shift + X
) and search for "CMake Tools"PICO_SDK_PATH
and set the Value to ..\..\pico-sdk
as shown belowFile > Open Folder
and navigate to the pico-examples
repo, then hit "Okay."