I'm not sure how things are in the C land, but if you write Rust take a look at this book [1], Embassy has a very good support for the RP2040.
Probe-rs [2] works perfectly well with GDB and the CLion debugger.
[1]: https://embassy.dev/book/
[2]: https://probe.rs/