This week: we'll continue with our quest to run a program start to end. Will we finally get hello_uart() to print the magic string and achieve the glorious moment of joy?
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
0:00 Let's start
1:10 Pi Pico + OpenOCD Setup
7:22 Using GDB with the Pico
13:52 ADD (SP plus immediate)
22:48 CPSID/CPSIE
27:14 LSRS - Logical Shift right (register)
46:51 STR store (SP, immediate) instruction
54:49 LDR Load (SP, immediate) instruction
1:00:37 BKPT instruction
1:03:35 The datasheet's opcode decoding table
1:07:10 SEV - Send Event
1:12:30 MVNS - Bitwise NOT
1:24:12 Can we connect GDB to the emulator?
1:28:48 Writing our own gdbserver
1:45:40 Processing GDB messages
2:05:17 Moment of glory: GDB connects to RP2040js! 🎉
2:12:12 Sending CPU registers to GDB
2:18:52 Verifying our GDB implementation
2:27:08 Using GDB to figure out where we are stuck
2:30:46 Summary + Please send PRs!