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 #60 background imageLoading...
Page #60 background image
Close MSYS2 and reopen the 64-bit version to make sure the environment picks up GCC.
$ git clone https://github.com/raspberrypi/openocd.git --branch picoprobe --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-picoprobe --disable-werror
$ make -j4
1.
Unfortunately disable-werror is needed because not everything compiles cleanly on Windows
Finally run OpenOCD to check it has built correctly. Expect it to error out because no configuration options have been
passed.
$ src/openocd.exe
Open On-Chip Debugger 0.10.0+dev-gc231502-dirty (2020-10-14-14:37)
Licensed under GNU GPL v2
For bug reports, read
Ê http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:56: Error: Can't find openocd.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 56
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Debug Adapter has to be specified, see "interface" command
embedded:startup.tcl:56: Error:
in procedure 'script'
at file "embedded:startup.tcl", line 56
Mac
Install brew if needed
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Getting started with Raspberry Pi Pico
Build OpenOCD 59

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