Live-coding Raspberry Pi Pico Emulator (Episode 9)

Опубликовано: 21 Март 2026
на канале: Wokwi
561
21

This week we'll hack on the gdbserver and then use it to diagnose the failing assertion in the Pico's startup code.

In this live-coding series we're implementing an emulator for the RP2040 chip, which powers the new Raspberry Pi Pico. Every week we implement a new feature together, diving into the datasheet and thickening our Cortex M0 implementation.

Previous streams:    • Live Coding RP2040 Emulator  

Get weekly updates about the streams: https://pages.wokwi.com/rp2040

For more details check out the Hackaday project: https://hackaday.io/project/177082-ra...

Project repo: https://github.com/wokwi/rp2040js
Wokwi Arduino simulator: https://wokwi.com

00:00 Getting started + Recap
1:38 ASRS, EORS, SXTB: reviewing Pull request from BrianPopeck 👍
15:10 Bug in signExtend8() and signExtend16()
21:56 Hacking on gdbserver
30:23 Digging into the GDB protocol
41:15 GDB 'M' - write memory
46:00 GDB 'c' - continue + execute() and stop() methods
56:17 Stepping/breakpoints don't work! 😒
1:05:40 Fixing Flash/bootrom memory writes
1:14:45 Forcing Thumb mod?
1:29:27 Comparing with the physical Pi Pico
1:33:57 GDB vCont command
1:42:12 stepi works! 🎉
1:46:47 UDF (undefined instruction) for GDB breakpoints
1:50:25 Branch decoding fix + PC after break
2:00:02 Breakpoints work! Great success 🥳
2:08:35 GDB 'P' - write register command
2:18:45 Setting up GDB debugging in Visual Studio Code
2:31:50 What's next?