EasyManua.ls Logo

Raspberry Pi Pico User Manual

Raspberry Pi Pico
77 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #29 background imageLoading...
Page #29 background image
11 // This may need to be arm-none-eabi-gdb depending on your system
12 "gdbPath" : "gdb-multiarch",
13 "device": "RP2040",
14 "configFiles": [
15 "interface/raspberrypi-swd.cfg",
16 "target/rp2040.cfg"
17 ],
18 "svdFile": "${env:PICO_SDK_PATH}/src/rp2040/hardware_regs/rp2040.svd",
19 "runToMain": true,
20 // Work around for stopping at main on restart
21 "postRestartCommands": [
22 "break main",
23 "continue"
24 ]
25 }
26 ]
27 }
NOTE
You may have to amend the gdbPath in launch.json if your gdb is called arm-none-eabi-gdb instead of gdb-multiarch
Pico Examples: https://github.com/raspberrypi/pico-examples/tree/master/ide/vscode/settings.json Lines 1 - 21
Ê1 {
Ê2 // These settings tweaks to the cmake plugin will ensure
Ê3 // that you debug using cortex-debug instead of trying to launch
Ê4 // a Pico binary on the host
Ê5 "cmake.statusbar.advanced": {
Ê6 "debug": {
Ê7 "visibility": "hidden"
Ê8 },
Ê9 "launch": {
10 "visibility": "hidden"
11 },
12 "build": {
13 "visibility": "hidden"
14 },
15 "buildTarget": {
16 "visibility": "hidden"
17 }
18 },
19 "cmake.buildBeforeRun": true,
20 "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
21 }
7.3.1. Running "Hello USB" on the Raspberry Pi Pico
Getting started with Raspberry Pi Pico
7.3. Debugging a Project 28

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Raspberry Pi Pico and is the answer not in the manual?

Raspberry Pi Pico Specifications

General IconGeneral
MicrocontrollerRP2040
Clock Speed133 MHz
SRAM264 KB
Flash Memory2 MB
GPIO Pins26
Operating Temperature-20°C to +85°C
ArchitectureARM Cortex-M0+ (dual-core)
InterfacesI2C, SPI, UART, PWM
Operating Voltage1.8–5.5 V
Dimensions51 mm × 21 mm

Summary

1. Quick Pico Setup

2. The SDK

2.1. Get the SDK and Examples

Download and clone the SDK and example repositories for development.

2.2. Install the Toolchain

Install necessary tools like CMake and the ARM embedded toolchain.

3. Blinking an LED in C

3.1. Building 'Blink'

Compile the 'Blink' C example program for the Raspberry Pi Pico.

3.2. Load and Run 'Blink'

Load and execute the compiled 'Blink' program onto the Raspberry Pi Pico.

4. Saying "Hello World" in C

4.3. Flash and Run 'Hello World'

Load and execute the compiled 'Hello World' program onto the Raspberry Pi Pico.

5. Flash Programming with SWD

5.3. Loading a Program

Use OpenOCD to load .elf program binaries into flash memory.

6. Debugging with SWD

6.3. Use GDB and OpenOCD for Debugging

Combine GDB and OpenOCD to interactively debug the 'Hello World' example.

7. Using Visual Studio Code

7.3. Debugging a Project

Set up and perform debugging for a project using VS Code and OpenOCD.

8. Creating Your Own Project

8.1. Debugging Your Project

Debug a custom project using command line tools and OpenOCD.

Appendix A: Using Picoprobe

Related product manuals