The Raspberry Pi Pico is a low cost microcontroller board with a dual-core Cortex-M0+ processor, RAM, flash, and a variety of I/O options.

The Pico is a low cost board and a good way to get started learning programming for Arm Cortex-M.

The Pico SDK uses the GCC compiler and Cmake to build applications.

Getting started with Raspberry Pi Pico C/C++ development contains more details of C/C++ programming on the Pico.

How do I use the Pico SDK installation script?

The Pico SDK installation script is managed in GitHub and is named pico_setup.sh

The installation script is designed to run on a Debian-based Linux distribution.

The script checks if you are running on a Raspberry Pi 3, 4, 400, or 5. There will be a warning if not, but the script will continue.

Installation has been tested on a Raspberry Pi 4, Ubuntu 22.04 and Ubuntu 20.04.

The script installs additional software using apt install, clones the Pico SDK repositories from GitHub, builds examples, and installs additional tools including VS Code and openocd for debugging.

Download the install script.

    

        
        
            wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh
        
    

On Ubuntu some additional packages are needed. Use the tabs to install extra packages.

    

        
        
            
sudo apt-get install jq minicom make cmake gdb-multiarch automake autoconf libtool libftdi-dev libusb-1.0-0-dev pkg-config clang-format -y
  
        
    
    

        
        
            
sudo apt-get install jq minicom make gdb-multiarch automake autoconf libtool libftdi-dev libusb-1.0-0-dev pkg-config clang-format -y
sudo snap install cmake --classic
  
        
    
    

        
        
            
Nothing more to install!
  
        
    

Use variables to skip the VS Code and UART software installation on Ubuntu.

If desired, VS Code can be installed from the download area instead.

The UART is not needed because a non-Raspberry Pi computer doesn’t have the I/O pins to the connect to the Pico UART.

    

        
        
            
SKIP_VSCODE=1 SKIP_UART=1 bash ./pico_setup.sh
  
        
    
    

        
        
            
bash ./pico_setup.sh
  
        
    

How do I verify that the Pico SDK development tools work?

Before continuing, confirm the required tools are operational.

Source the new .bashrc file as new variables are added by the Pico SDK.

    

        
        
            source ~/.bashrc
        
    

There are four added variables. Display them with the env command.

    

        
        
            env | grep PICO
        
    

Here is the output.

    

        
        PICO_EXTRAS_PATH=/home/pi/pico/pico-extras
PICO_SDK_PATH=/home/pi/pico/pico-sdk
PICO_PLAYGROUND_PATH=/home/pi/pico/pico-playground
PICO_EXAMPLES_PATH=/home/pi/pico/pico-examples

        
    

Each tool should run and return a message about the version installed.

    

        
        
            arm-none-eabi-gcc --version
        
    
    

        
        
            gdb-multiarch --version
        
    
    

        
        
            cmake --version
        
    
    

        
        
            openocd --version
        
    

How do I install the Pico SDK on other operating systems?

If you are not using Linux there are instructions included in the Getting Started guide referenced above. Instructions are available for Microsoft Windows and Apple macOS.

Back
Next