SDK Setup
For a full walk-through of how to get going with the C/C++ SDK, you should read our 'getting started' documentation. However, if you are intending to develop for Pico on a Raspberry Pi, then you can set up the C/C++ toolchain quickly by running our setup script from the command line.
You should make sure the OS on your Raspberry Pi is up to date before running the setup script. |
Raspberry Pi Pico C/C++ SDK
Our official C SDK can be used from the command line, or from popular integrated development environments like Visual Studio Code, Eclipse, and CLion. To get started, download our C/C++ SDK and Examples, and take a look at our 'getting started' documentation to get going. Or for a quick setup see the next section.
-
The SDK Github repository
-
The Examples Github repository
You can find documentation around the C/C++ SDK at;
- Getting started with Raspberry Pi Pico
-
C/C++ development with Raspberry Pi Pico and other RP2040-based microcontroller boards
- Connecting to the Internet with Raspberry Pi Pico W
-
Getting Raspberry Pi Pico W online with C/C++ or MicroPython
- Raspberry Pi Pico C/C++ SDK
-
Libraries and tools for C/C++ development on RP2040 microcontrollers
The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is also available as a micro-site.
If you are building applications with the C/C++ SDK and targeting boards other than the Raspberry Pi Pico, you will need to pass |
If you are building applications with the C/C++ SDK for Raspberry Pi Pico W and, to connect to a network you will need to pass |
Your First Binaries
Blink an LED
The first program anyone writes when using a new microcontroller is to blink an LED on and off. The Raspberry Pi Pico comes with a single LED on-board. The LED is connected to GP25
on the board’s Raspberry Pi RP2040 for Pico, and WL_GPIO0
on the Infineon 43439 wireless chip for Pico W.
You can blink this on and off by,
-
Download the Blink UF2 for Raspberry Pi Pico, or for Pico W.
-
Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.
-
It will mount as a Mass Storage Device called RPI-RP2.
-
Drag and drop the Blink UF2 binary onto the RPI-RP2 volume. Pico will reboot.
You should see the on-board LED blinking.
You can see the code on Github for the Raspberry Pi Pico and Pico W versions.
Say "Hello World"
The next program anyone writes is to say 'Hello World' over a USB serial connection.
-
Download the 'Hello World' UF2.
-
Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.
-
It will mount as a Mass Storage Device called RPI-RP2.
-
Drag and drop the 'Hello World' UF2 binary onto the RPI-RP2 volume. Pico will reboot.
-
Open a Terminal window and type:
1 2
sudo apt install minicom minicom -b 115200 -o -D /dev/ttyACM0
You should see 'Hello, world!' printed to the Terminal.
You can see the code on Github