Basic Toolchain Setup for Programming
Raspberry Pi Pico Using C
This walkthrough shows how to setup Debian Linux to program the RP2040 based Rasperry Pi Pico in the C programming language using the official SDK (Software Development Kit). Code will be compiled on the bash terminal using the cmake and make through the gcc complier included with the SDK.
Code will be loaded via the USB device bootloader interface by holding the Pi Pico's built in button during power-on.
For writing source, any code aware text editor will suffice. Good options code editor options are Atom and gedit or command line based vim and nano.
1. Download Resources
- Download the Official Raspberry Pi Pico SDK below:
2. Setup a Project Development Directory
- Open the windows Activities Overlay and type files in the search bar. Select the File Explorer.
- The file browser will open in your home directory by default. Create a new folder by Right Clicking in the main folder area. Name the folder pico-dev .
- Move to your Downloads directory. Right Click the pi-pico-sdk.zip select Extract to.... Next select your new pico-dev folder
3. Check Dependancies & Install if Needed [not necessary at CEC]
DEBIAN LINUX
- You will need root access or administrative privilages through sudo.
- Open a terminal and enter the following.
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
WINDOWS 10/11
- [instructions to be posted soon.]
MAC OS
- [instructions to be posted soon.]
4. Install Code Editor - Atom Recommended [not necessary at CEC]
- Download and Install Atom Code Editor. Be sure to select for your Operating System.
Atom Editor Linux Installer for Debian Branches [.deb]
Atom Editor Windows Installer [.exe] (to be posted soon)
Atom Editor for MacOS [.zip] (to be posted soon)
5. Test Your Toolchain with Hello World Blink
- Follow the code page for Pi Pico Hello World Blink below: