Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform
      • Arduino Plaform
      • BBC micro:bit
      • Espressif Platform >
        • ESP32-DevKitM-2 Board
      • LaunchPad Plaform
      • Microsoft Azure IoT DevKit
      • Raspberry Pi Platform
      • Seeeduino Platform
      • Teensy Plaform
    • Computer Platforms >
      • BeagleBone Platform
      • Mediatek Platform
      • UDOO Platform
    • Peripherals >
      • BoosterPacks for LaunchPads
      • Shields
      • Grove System
      • Sensors
      • Actuators
    • Displays >
      • E-Paper Displays
      • Reflective Displays
      • TFT Displays
      • LCD Displays
    • Legacy Platforms >
      • chipKIT Plaform >
        • chipKIT Uno32 and uC32
        • chipKIT WF32 and WiFire
        • Compatibility
        • chipKIT PGM Programmer-Debugger
        • 4D Systems PICadillo-35T
        • Shields for chipKIT Uno32
        • 4D Systems Platform >
          • 4D Systems PICadillo-35T
          • 4D Systems gen4-IoD-28T
      • Cosa, an Alternative Framework for AVR Boards
      • DFRobot Platform >
        • DFRobot BLuno
        • DFRobot Wido
      • Digistump Platform >
        • Digispark
        • Oak
      • Intel Platform >
        • Intel Curie with Neural Network
        • Intel Edison
      • LightBlue Bean
      • Little Robot Friends
      • Maple Plaform >
        • LeafLabs Maple
      • Microduino Plaform >
        • Microduino
      • Particle Platform >
        • Particle Core
        • Particle Photon
        • Particle Tools
      • Protostack Platform >
        • Protostack Boards
      • RedBear Platform >
        • RedBearLab CC3200
        • RedBearLab WiFi Mini
        • RedBear Duo
      • Wiring Plaform >
        • Wiring S
        • Wiring Play Shield
  • Software
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
  • IoT
    • IoT Platforms: Which Hardware?
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions
      • Platform-Specific IoT Solutions
      • Other IoT Solutions
      • Not tested IoT Solutions
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • Boards Pins Maps
      • Ruler
      • Boards and Plugs
      • I²C Logic Level Converter
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDE >
      • The Battle of IDEs >
        • Arduino IDE 2.0
      • More Options
      • Assessing the Next Generation of IDEs
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger
      • Nordic Power Profiler Kit II
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • highView Library Suite
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Remote e-Paper Pictures Panel
      • Remote e-Paper Messages Panel
      • Industrial IoT Project
      • Remote Contactless Temperature Monitor
      • Using Node-RED for IIoT
      • Low Power Home Network Weather Monitoring
      • Updated Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • AI Projects >
      • Colour Recognition with Neural Network
    • Other Projects >
      • Driving a Large E-Paper Display with a Compact Xiao RP2040
      • Low-Power E-Paper Weather Station
      • Portable Particulate​ Matter Monitor
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

Debugging against the Pico Board

There are different ways to carry debugging against the Raspberry Pi Pico:
  • Using the second core of the same Pico,
  • Using a second Pico board,
  • Using a Raspberry Pi 4B,
  • Using a standard programmer-debugger like .
​
Picture

Using the second core of the same Pico

Since the RP2040 features two cores, why not using one core to debug the other? This is the interesting approach to get a first look at debugging.

Alas, I couldn't manage to run the debugger and debug the application at the same time. I may have missed one step in the procedure.  

Using a second Pico board

As the Pico goes for USD4, why not using a second Pico as a programmer-debugger? 

Called PicoProbe, this solution works very well. The first Pico is turned into a programmer-debugger after flashing an executable available as a UF2 file. Then it is connected to the second Pico, the target. The programmer-debugger also reroutes the serial port from pin 0 and 1 of the target.

The Serial port of the target is no longer Serial on the USB port, by Serial1 on pins 0 and 1.
Picture

Using a Raspberry Pi 4B

I haven't tested this solution.

Using a standard programmer-debugger

The standard tools include the openOCD server, the GDB client and a Segger J-Link programmer-debugger.

I faced various issues, but found fixes for all of them:
  • As a multi-core MCU, the RP2040 requires the SWD multi-drop feature, which is available on Segger J-Link probes starting version 10. My Segger J-Link probe was version 9, so it didn't support it. This was fixed by using a more recent Segger J-Link probe or the Segger J-Link Edu mini.
Picture
  • Similarly, the Arduino port relies on mbed, which is surprisingly not supported by Segger. Using the excellent arduino-pico by Earle F. Philhower, actually based on the RP2040 SDK, brought stability and allowed debugging.
  • The standard version of OpenOCD doesn't support the RP2040. A special branch on the Raspberry Pi fork of OpenOCD solves the issue.
As an extra benefit, debugging is launched right from Visual Studio Code.
Picture

Links

  • Boards package arduino-pico by Earle F. Philhower
  • Raspberry Pi fork of OpenOCD
  • Raspberry Pi official documentation
  • Debugging using another Raspberry Pi Pico
Picture

​Posted: 21 Apr 2022
Updated:
Powered by Create your own unique website with customizable templates.