EasyManuals Logo

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 #56 background imageLoading...
Page #56 background image
Ensuring your Raspberry Pi 4 and Raspberry Pi Pico are correctly wired together, we can attach OpenOCD to the chip, via
the
swd and rp2040 configs.
$ openocd -f interface/raspberrypi-swd.cfg -f target/rp2040.cfg
WARNING
If your flash has DORMANT mode code in it, or any code that stops the system clock, the debugger will fail to attach
because the system clock is stopped. While this may present as a "bricked" board you can return to BOOTSEL mode
using the button without problems.
This OpenOCD terminal needs to be left open. So go ahead and open another terminal, in this one we’ll attach a gdb
instance to OpenOCD.
Navigate to your project, and start
gdb,
$ cd ~/pico/test
$ gdb-multiarch test.elf
Connect GDB to OpenOCD,
(gdb) target remote localhost:3333
and load it into flash, and start it running.
(gdb) load
(gdb) monitor reset init
(gdb) continue
With both
openocd and gdb running, open a third window and start openocd-svd pointing it to the SVD file in the SDK.
$ python3 openocd_svd.py /home/pi/pico/pico-sdk/src/rp2040/hardware_regs/rp2040.svd
This will open the
openocd-svd window. Now go to the File menu and click on "Connect OpenOCD" to connect via telnet to
the running
openocd instance.
This will allow you to inspect the registers of the code running on your Raspberry Pi Pico, see
Figure 34.
Getting started with Raspberry Pi Pico
10.3. Other Environments 55

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
ProcessorDual-core Arm Cortex-M0+
Clock Speed133 MHz
SRAM264 KB
GPIO30
USBUSB 1.1 Host/Device
PWM16 channels
UART2
SPI2
I2C2
Temperature Range-20°C to +85°C
Operating Voltage1.8V to 3.3V
FlashExternal QSPI flash
I/O InterfacesSPI, I2C, UART, PWM
ADC4 × 12-bit ADC channels

Related product manuals