Picoco
A repository to store Rasbperry Pico C sample projects.
It uses the Freenove Super Starter Kit For Raspberry Pi Pico, the tutorial and ressources can be found here.
The official documentation to start with the Raspberry Pi Pico: Getting started with Raspberry Pi Pico-series and the C SDK documentation. Some examples can be found here: github.com/raspberrypi/pico-examples.
NOTE: the configuration defined in config/FreeRTOSConfig.h is specific for the Raspberry Pi Pico 2 RP2350. Feel free to update it for your Pico spec.
The FreeRTOS documentation can found here: FreeRTOS book.
Installation
In order to build and deploy the binary in the Raspberry Pi Pico, you have to install the Pico C SDK, Picotool & FreeRTOS Raspberry Kernel.
So, you need to execute the following command that will installed all:
make install
NOTE: this will install the SDK, Picotool and FreeRTOS in the current directory. If you want to set an other intallation path,
set the INSTALL_PATH variable. The INSTALL_PATH directory must exists, create it before and make sure user have write rights.
The SDK and Picotool version used is: 2.1.0.
Generate a project
You can generate a new Pico C project with the command:
make project name=<project_name>
It will create a new project in the current directory and build it.
Compile
Update you main.c file and then launch:
make compile name=<project_name>
It will generate the .elf file in the build directory.
Load binary into the device
You can combine both compilation and load with the following command:
make push name=<project_name>
NOTE: you have to USB plug your Pico device in BOOTSEL mode before executing the command.
After the load, the device will automatically reboot and be unpluged. And the program freshly pushed will start.
Available projects
- simple_led: A little program with a single LED + a button. You can push the button 10+ times, after the LED lights off. You can reset the application by pressing the button ~2 secs. It used FreeRTOS engine on two cores.
- bit_counter: Nothing extraordinary, just a bit counter wit a LED bar.
- breathing_led: Plays with PWM on a LED bar to lights on LED in funny way (meteor, waves, etc...).
- buzzer: Actually this is not a buzzer... It just an alarm using a passive buzzer that you can run/stop by pushing the button. It used FreeRTOS engine on two cores.
Get device info
When plugging your device in BOOTSEL mode, you can get the device information using:
make info
Program Information
name: simple_led
version: 0.1
binary start: 0x10000000
binary end: 0x10001744
target chip: RP2350
image type: ARM Secure
Fixed Pin Information
none
Build Information
sdk version: 2.1.0
pico_board: pico2
boot2_name: boot2_w25q080
build date: Feb 18 2025
build attributes: Release
Metadata Block 1
address: 0x10000138
next block address: 0x10001730
block type: image def
target chip: RP2350
image type: ARM Secure