86 lines
2.7 KiB
Markdown
86 lines
2.7 KiB
Markdown
# 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](https://github.com/Freenove/Freenove_Super_Starter_Kit_for_Raspberry_Pi_Pico).
|
|
|
|
The official documentation to start with the Raspberry Pi Pico: [Getting started with Raspberry Pi Pico-series](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf). Some examples can be found here: [github.com/raspberrypi/pico-examples](https://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.
|
|
|
|
## 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:
|
|
```bash
|
|
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:
|
|
```bash
|
|
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 fresly pushed will start.
|
|
|
|
## Get device info
|
|
When plugging your device in **BOOTSEL** mode, you can get the device information using:
|
|
```bash
|
|
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
|
|
```
|
|
|