# \[Guide\] Faster Debugging and Flashing for PicoCalc

**URL:** <https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483>\
**Category:** PicoCalc\
**Tags:** tinkering, community, hardware, guide\
**Created:** [April 3, 2025, 4:38am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483 "2025-04-03T04:38:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adwuard](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adwuard/32/11466_2.png) [@adwuard](https://forum.clockworkpi.com/u/adwuard)\
**Post date:** [April 3, 2025, 4:38am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/1 "2025-04-03T04:38:15Z")

</div>

This guide demonstrates how to bypass the repetitive manual steps of firmware flashing on the PicoCalc by leveraging the Pico Probe’s GDB debugging capabilities. Say goodbye to pressing hard-to-reach buttons and enjoy a hands-free, efficient workflow for debugging and firmware update and flashing.

**Complete Guide [Original Post]:** [https://hsuanhanlai.com/accelerate-PicoCalc-debugging/](https://hsuanhanlai.com/accelerate-PicoCalc-debugging/)

 ![DSCF4731](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/5/5c144ef2d1a1f303cec2a37e345ff051c944ad16.jpeg)

# Setting Up the Pico Probe

Follow the official [Pico Probe documentation](https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html) to install OpenOCD on your system (Windows/Linux/Mac). Once set up, the Pico Probe allows you to keep the PicoCalc powered by its battery while flashing firmware seamlessly.

* * *

## Flashing Firmware

Use the following commands to flash firmware onto your PicoCalc:

### For Pico 1 Models

```shell

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "program hello_serial.elf verify reset exit"

```

### For Pico 2 Models

```shell

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2350.cfg -c "adapter speed 5000" -c "program hello_serial.elf verify reset exit"

```

* * *

## Debugging with OpenOCD and GDB

Start the OpenOCD server:

```shell

sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"

```

In a separate terminal, navigate to your binary’s directory and attach GDB to the OpenOCD server:

```shell

gdb blink.elf

> target remote localhost:3333

> monitor reset init

> continue

```

* * *

## Serial Debugging

The PicoCalc includes a built-in serial converter. For serial debugging, connect a USB Type-C cable directly to the PicoCalc instead of using the Pico Probe’s UART debug probe.

# Conclusion

By following this guide, you can significantly enhance your PicoCalc development experience, saving time and effort while enjoying the full potential of the Pico Probe’s debugging capabilities.

---

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [April 3, 2025, 5:34am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/2 "2025-04-03T05:34:18Z")

</div>

Nice doc

and welcome to the community

---

<div class="post-metadata">

**Author:** ![centerorbit](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/centerorbit/32/11375_2.png) [@centerorbit](https://forum.clockworkpi.com/u/centerorbit)\
**Post date:** [April 4, 2025, 5:26pm UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/3 "2025-04-04T17:26:36Z")

</div>

I just finished making an alternate 3D printable back case that sports an internal tray to hold the Pi Debug Probe: [PicoCalc Back with Pico Probe Port by Odd Inventor | Download free STL model | Printables.com](https://www.printables.com/model/1253552-picocalc-back-with-pico-probe-port)

 ![Room_v1_2025-Apr-04_04-56-39PM-000_CustomizedView8515848894](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/e/edd387711b97e9b16c997a72f6599d034b210498.jpeg)

---

<div class="post-metadata">

**Author:** ![adwuard](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adwuard/32/11466_2.png) [@adwuard](https://forum.clockworkpi.com/u/adwuard)\
**Post date:** [April 5, 2025, 2:57pm UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/4 "2025-04-05T14:57:22Z")

</div>

great mod, and great visual rendering​:+1:👍 I’m gonna try and print one too.😁

---

<div class="post-metadata">

**Author:** ![wezm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/wezm/32/11469_2.png) [@wezm](https://forum.clockworkpi.com/u/wezm)\
**Post date:** [April 8, 2025, 2:48am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/5 "2025-04-08T02:48:58Z")

</div>

Thanks for the inspiration to use the debug probe for flashing. I noticed a small gap in the back shell and the 18650 holder, so routed the SWD cable through there. Now I just need to flip the battery cover off to access the cable and connect the debug probe.

 ![PXL_20250408_024352036](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/6/62805e3187b94ac80e6c6812b755755beaffa924.jpeg)  
 ![PXL_20250408_024434674](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/0/0e86d3775ef0e30a425e5c65c864d54b6c0d6f3a.jpeg)

**Edit:** I meant to reply to OP.

---

<div class="post-metadata">

**Author:** ![adwuard](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adwuard/32/11466_2.png) [@adwuard](https://forum.clockworkpi.com/u/adwuard)\
**Post date:** [April 9, 2025, 5:23pm UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/6 "2025-04-09T17:23:36Z")

</div>

This is a better solution than mine​:grin:👍 I had both batteries mounted. So I wasn’t think of this 😂

---

<div class="post-metadata">

**Author:** ![ethern0t](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ethern0t/32/12016_2.png) [@ethern0t](https://forum.clockworkpi.com/u/ethern0t)\
**Post date:** [May 26, 2025, 8:54am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/7 "2025-05-26T08:54:30Z")

</div>

This is really cool. My only issue is that I had to use a heat gun to get my debug probe to fit in the holder, and I realized I was probably supposed to connect the debug probe cable before doing that because it wouldn’t fit through the gap. Some pliers took care of removing the bit of plastic blocking it.

It is _so_ much nicer than having the debug probe dangling around loose waiting to get caught on something and break.

Thank you!

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ben/32/11799_2.png) [@Ben](https://forum.clockworkpi.com/u/Ben)\
**Post date:** [May 26, 2025, 11:26am UTC](https://forum.clockworkpi.com/t/guide-faster-debugging-and-flashing-for-picocalc/16483/8 "2025-05-26T11:26:28Z")

</div>

I had been using the SD port to pass the probe cable, but the battery bay is even better.
