bloombloombloom / Bloom

A debug interface for AVR-based embedded systems development on GNU/Linux.
https://bloom.oscillate.io/
Other
64 stars 3 forks source link

Add support for UPDI over /dev/ttyUSBx and similar interfaces #97

Open kajusK opened 7 months ago

kajusK commented 7 months ago

The UPDI interface is simple enough to work with a cheap USB<>UART converter and a single resistor. Would it be possible to add option to use the tty device directly for debugging?

navnavnav commented 7 months ago

Hi,

As is the case on most AVR targets, the debugging protocol for UPDI targets is proprietary. Microchip's EDBG debug tools implement the proprietary protocol in firmware, and expose a USB protocol for front-end software such as Bloom.

So it wouldn't be possible to implement UPDI debugging without resorting to reverse engineering, which is something I'd rather not do.

kajusK commented 7 months ago

Hi, there's a project attempting to implement the UPDI debugger in software - https://github.com/kristianlm/updi-gdbserver/tree/master. So far it only supports the attiny 414, but the project seems to be active. It might be worth a try as the UPDI<>computer interface itself is extremely cheap and easy to implement.

navnavnav commented 7 months ago

The problem with reverse engineering is that you almost always end up with more questions than when you started. And when all you have is findings from reverse engineering, it's incredibly difficult to have any confidence in what you're building.

It will take a lot of time and effort to implement something like this to a point where it's stable and reliable. I just don't think it's worth it. But let's see - I will put this ticket into 'in consideration'. If it gets at least 10 👍🏽 reactions, I will reconsider.

But that other project looks interesting and seems to be fairly active, so maybe let them have a go at it.

kajusK commented 5 months ago

Just a side note, the updi-gdbserver works quite nice for debugging my target, it would be even better if I could use the Bloom Insight by connecting to gdb server started by updi-gdbserver instead of launching the bloom gdb server which requires a proprietary debugger device. The Insight looks like a very nice tool for inspecting the MCU state, reading registers, etc. It's a pity it only works with the bloom gdb server while there are other gdb implementation out there.

Btw, the authors of updi-gdbserver are very nice people, it was a very pleasant experience debugging an issue on my board together with them.