Where I show a simple method of using gdb to debug code on the RP2040 (Pi Pico board).
The Guide recommends at the very least, add “target remote localhost:3333” to your .gdbinit file. To make our edit/compile/link/load round trip easy, I recommend the following for your .gdbinit:
Where I begin to develop code in C on the RP2040.
I like using Forth to develop code on embedded microcontrollers, however at times, I’ll have a project that requires a more supportive framework. In this case, C is a superior choice if I need the execution speed of Forth and the framework of microPython. This requires a significant investment in building the tools required and skills to use those tools, to develop in C.
All of the resources found related to gdb (particularly, related to the RP2040) and how to use it.
avarice -g -w -d -P atmega328p :3333 # window 1
avr-gdb -tui # window 2
While the Arduino tool set, (both the Arduino IDE and Arduino software framework) are outstanding for quickly developing a working prototype, they do so with a combination of a graphical-user-interface (GUI), the C++ language and Arduino-only classes. This in itself, isn’t a problem, one can be quite efficient and productive using this approach.
This approach is an issue if you are at a university or job which expects a standards-based C language proficiency. It is also an issue, if your class or job, requires understanding how to use command-line-interface (CLI)-based tools. The C language, and not C++, is the basis of a significant number of embedded systems development.
A set of entries which comprise a course for learning how develop C programs for the RP2040.