Raspberry Pi Documentation

The C/C++ SDK

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.

Note
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.

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

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.

Your First Binaries

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 (connected to GPIO pin 25).

Blink an LED 640x360

You can blink this on and off by,

  1. Download the Blink UF2

  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.

  3. 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, and the on-board LED should start blinking.

Say "Hello World"

The next program anyone writes is to say 'Hello World' over a USB serial connection.

Hello World 640x360

  1. Download the 'Hello World' UF2.

  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer.

  3. It will mount as a Mass Storage Device called RPI-RP2.

  4. Drag and drop the 'Hello World' UF2 binary onto the RPI-RP2 volume. Pico will reboot

  5. Open a Terminal window and type:

    sudo apt install minicom
    minicom -b 115200 -o -D /dev/ttyACM0

You should see 'Hello, world!' printed to the Terminal