Getting Started with Raspberry Pi Pico C/C++ SDK on RP2040 or RP2350 Microcontrollers #raspberrypi

preview_player
Показать описание
The Raspberry Pi Pico C/C++ SDK is a software development kit that provides the necessary libraries and tools for writing C and C++ programs targeting the Raspberry Pi Pico and Pico 2 as well as other devices with RP2040 and RP2350 microcontrollers. It includes drivers, hardware abstraction layers, and utilities to interact with the hardware peripherals of the board, such as GPIO, I2C, SPI, and more. The SDK is essential for developers looking to write efficient, low-level code and allows for the compilation and flashing of custom firmware onto the Raspberry Pi Pico. This SDK is suitable for all device and printed circuit boards with RP2040 and RP2350, for example XIAO RP2040. For demonstrations in this video we will use Raspberry Pi 5, Raspberry Pi Pico and ANAVI Dev Mic, an open source USB-C computer microphone with Raspberry Pi RP2040 microcontroller. Follow the steps below to install the SDK on Raspberry Pi single board computer or a PC and build firmware from scratch:

1️⃣ Download the Raspberry Pi Pico C/C++ SDK:

cd ~
cd pico-sdk
git submodule update --init

2️⃣ Install Raspberry Pi Pico C/C++ SDK dependencies:

sudo apt update
sudo apt install cmake gcc-arm-none-eabi build-essential

3️⃣ Set the PICO_SDK_PATH:

export PICO_SDK_PATH=/path/to/pico-sdk

4️⃣ Download the firmware for ANAVI Dev Mic based on "Microphone library for Pico":

cd ~

5️⃣ Create the build directory, run CMake, and make:

cd microphone-library-for-pico
mkdir build
cd build
cmake .. -DPICO_BOARD=pico
make

*️⃣ NOTE: If you are interested in using Visual Studio Code and the extension for Raspberry Pi Pico instead follow the steps from this tutorial:

📚 Useful Links
===

📺 Chapters
===
0:00 Intro
1:05 Pico
2:05 Raspberry Pi 5
2:43 Download SDK
3:34 Install Dependencies
4:17 Build Firmware
5:36 Flash Firmware
8:21 Conclusions
Рекомендации по теме