Running and debugging
Gitpod works well for coding and building microcontroller software, but what about running and debugging it? This is more complex by nature since the Raspberry Pi Pico is on our desk and not physically attached to the Gitpod cloud instance.
Let’s take the scenario where the Raspberry Pi Pico is on my desk and connected to the Raspberry Pi 4. In Chapter 4, Booting to Main, we reviewed how to use openocd
and gdb
to connect, load, and run the hello world
program on the Pico. We will use some of these concepts here as we work in Gitpod and use gdb
to connect to and debug the dot product application. Review Chapter 4, if needed when following the next few steps:
- First, return to your Gitpod workspace – created either from the custom container image or the initialization commands – and build the application with debug settings:
mkdir build ; cd build cmake -DCMAKE_BUILD_TYPE=Debug .. make
- From a terminal on your local Raspberry Pi...