This article is about how to blink the LED on a Raspberry Pi Pico from the Windows operating system.
This tutorial is based off of Chapter 2 – The SDK from the Raspberry Pi Pico Quickstart PDF
We will be using Windows Subsystem for Linux (WSL) to compile the Raspberry Pi Pico code
Now we should have the WSL enabled and an Ubuntu distro installed
sudo apt upgrade
Create a directory named pico
$ mkdir pico $ cd pico
pico-examples git repos
$ cd pico-sdk $ git submodule update --init $ cd .. $ git clone -b master https://github.com/raspberrypi/pico-examples.git
Install the toolchain
$ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
change directories into the
pico-examples repo directory and create a build directory
$ cd pico-examples $ mkdir build $ cd build
Set the env to the location of the
$ export PICO_SDK_PATH=../../pico-sdk
Run the cmake to prepare the build directory
$ cmake ..
Change directories into the
blink directory and then build the project
$ cd blink $ make -j4
There should now be a
blink.elf and a
blink.uf2 in the build directory
The final step is to connect the Raspberry Pi Pico as a mass storage device. Do this by holding down the
BOOTSEL button then plugin in the micro usb cable
blink.uf2 to the Raspberry Pi Pico mass storage device and the Raspberry Pi Pico should auto detect once the
blink.uf2 is copied and start executing the program.
That is it we are now blinking the LED!!!