This webpage is for students enrolled in ECE 4760/5730 at Cornell. It walks you through downloading the RP2040 C SDK and course demo code, and building that demo code.
This document assumes that the build environment has already been setup on the computer (as it is in the computer lab). For information about setting this build environment up on your own machine, please see:
The video below demonstrates the entire procedure described on this webpage.
Start menu --> Visual Studio 2019 --> Developer PowerShell for VS 2019
PS C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools> cd C:\Users\NETID\Documents
Pico
by running:PS C:\Users\NETID\Documents> mkdir Pico
PS C:\Users\NETID\Documents> cd Pico
PS C:\Users\NETID\Documents\Pico> git clone -b master https://github.com/raspberrypi/pico-sdk.git
pico-sdk
directory by running:PS C:\Users\NETID\Documents\Pico> cd pico-sdk
PS C:\Users\NETID\Documents\Pico\pico-sdk> git submodule update --init
Pico
directory by running:PS C:\Users\NETID\Documents\Pico\pico-sdk> cd ..
PS C:\Users\NETID\Documents\Pico> git clone -b master https://github.com/vha3/Hunter-Adams-RP2040-Demos.git
PICO_SDK_PATH
path variable by running:PS C:\Users\NETID\Documents\Pico> setx PICO_SDK_PATH "..\..\pico-sdk"
PICO_TOOLCHAIN_PATH
path variable by running:PS C:\Users\NETID\Documents\Pico> setx PICO_TOOLCHAIN_PATH "C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\"
- If you are at PC 27 or 44 (check the sticker on the side of the PC), please raise your hand! This step is different for you.
Start menu --> Visual Studio 2019 --> Developer PowerShell for VS 2019
PS C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools> cd C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos\
build
by running:PS C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos> mkdir build
build
directory by running:PS C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos> cd build
PS C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos\build> cmake -G "NMake Makefiles" ..
PS C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos\build> nmake
Documents/Pico/Hunter-Adams-RP2040-Demos/build
. There, you will find a folder for each project in the demo repository. Each folder contains the executables for that particular project. To program the RP2040 with one of those executables, press the BOOTSEL
button, plug it into the PC, and drag/drop the uf2 file for that project onto the external memory device that appears.Start menu --> Visual Studio 2019 --> Developer PowerShell for VS 2019
PS C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools> cd C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos\build\
PS C:\Users\NETID\Documents\Pico\Hunter-Adams-RP2040-Demos\build> nmake
Documents/Pico/Hunter-Adams-RP2040-Demos/build
. There, you will find a folder for each project in the demo repository. Each folder contains the executables for that particular project. To program the RP2040 with one of those executables, press the BOOTSEL
button, plug it into the PC, and drag/drop the uf2 file for that project onto the external memory device that appears.