EasyManuals Logo
Home>Raspberry Pi>Microcontrollers>RP2040

Raspberry Pi RP2040 User Manual

Raspberry Pi RP2040
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 #20 background imageLoading...
Page #20 background image
RP2040) inside the microcontroller. The debug translator also knows how to talk to the specific debug probe that you
have connected to the SWD port, and how to program the flash on your device.
This section walks through installing a debug translator called OpenOCD.
TIP
If you have run the pico-setup script on your Raspberry Pi (Chapter 1), OpenOCD is already installed and you can skip
to the next section.
NOTE
These instructions assume you want to build openocd in /home/pi/pico/openocd
$ cd ~/pico
$ sudo apt install automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-
dev
$ git clone https://github.com/raspberrypi/openocd.git --recursive --branch rp2040 --depth=1
$ cd openocd
$ ./bootstrap
$ ./configure --enable-ftdi --enable-sysfsgpio --enable-bcm2835gpio
$ make -j4
$ sudo make install
OpenOCD should now be installed, and you can run it as
openocd from your terminal.
5.2. SWD Port Wiring
You need to connect wires to the SWD port in order to program and run code on RP2040 via SWD.
Figure 7. A Raspberry
Pi 4 and the Raspberry
Pi Pico with UART and
SWD port connected
together. Both are
jumpered directly back
to the Raspberry Pi 4
without using a
breadboard. Only the
lower three wires in
this diagram are
needed for SWD
access; optionally you
can also connect the
Pi UART, as shown by
the upper 3 wires, to
directly access the
Pico’s serial port.
The default configuration is to have SWDIO on Pi GPIO 24, and SWCLK on GPIO 25and can be wired to a Raspberry Pi
Pico with the following mapping,
Getting started with Raspberry Pi Pico
5.2. SWD Port Wiring 19

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Raspberry Pi RP2040 Specifications

General IconGeneral
BrandRaspberry Pi
ModelRP2040
CategoryMicrocontrollers
LanguageEnglish

Related product manuals