Debugging Trinkey QT2040

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
romatthe
 
Posts: 1
Joined: Sun Jan 29, 2023 8:30 pm

Debugging Trinkey QT2040

Post by romatthe »

I'm very new to programming embedded systems and MCUs, and have no formal knowledge, so please forgive me for what is likely a very stupid question. This is all extremely new for me, so I might sound confused.

In the past months I've written some C and Rust, first for the BBC micro:bit and then for the RPi Pico. In both of those cases, debugging my programs was rather easy, even though in the case of the Pico a second Pico was needed to control the debugging process over SWD, but nothing that a breakout board and a few online instructions couldn't fix.

I recently found the Trinkey QT2040, which in terms of its form factor, capabilities and the fact that it has an RP2040 makes it absolutely perfect for a hobby project I was thinking about. However, I don't quite know how one would go about debugging a program for this little board. From what I can tell, the original QT Py had two SWD pin pads that could be used to connect a debugger/programmer to the little thing. But from what I can tell the QT Py RP2040 does NOT come with these pads, and neither does the Trinkey QT2040.

So my question is, it it possible to debug a program on this board? If so, how would I go about connecting a debugger/programmer to this? And is this possible without any soldering? I have never learned to solder, have no proper soldering iron and also happen to suffer from a very unsteady right hand.

For clarification, my previous experience has been with GDB -> OpenOCD -> SWD. And like before, I'm not going to write any MicroPython or anything like that. Just bare-metal C and maybe Rust.

Thanks!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Debugging Trinkey QT2040

Post by adafruit_support_mike »

romatthe wrote: Sun Jan 29, 2023 8:47 pm So my question is, it it possible to debug a program on this board?
You won't be able to use a typical JTAG debugger. You're correct that SWDCLK and SWDIO aren't broken out on the Trinkey QT2040.

Attaching bodge wires to them is technically possible, but would be at the level of a party trick for experienced SMD prototypers. I wouldn't recommend it.

For debugging, you'll have to drop back to more primitive methods.. print() statements, color/blink patterns from the NeoPixel, and that kind of thing.

On the positive side, the RP2040 is the same across the whole product line. You can do JTAG debugging on a board that does have SWDIO/SWCLK connections then move the code over to the Trinkey.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”