microchip-pic-avr-tools / pyedbglib

Low-level protocol library for communicating with Microchip CMSIS-DAP based debuggers
MIT License
12 stars 4 forks source link

pyedbglib-based GDB server? #4

Open maxgerhardt opened 1 year ago

maxgerhardt commented 1 year ago

With this library being able to talk to a debugger probe like the mEDGB et cetera, does Microchip have plans to create another program that opens up a GDB server and uses this library to facilitiate the low-level debugging?

I've seen something like this in the ATMega4809 + UPDI configuration at https://github.com/stemnic/pyAVRdbg/blob/master/main.py, but it's definitely not feature-complete or working for all MCUs.

I was specifically thinking about the ATMega328P XPlained-mini, which has a mEDGB probe on-board and could speak debugWire to the ATMega328P.

xedbg commented 1 year ago

Hi @maxgerhardt, Background: pyedbglib and pymcuprog are utilities that we use internally primarily for CICD testing of our Curiosity Nano kits. Since these kits are "EDBG based" the same protocol effectively applies to these older tools, and older interfaces like debugWIRE. So pymcuprog was built with stubs to support these, but they are not entirely populated. We use very low-level testing of debug functionality with 'fixed' test patterns, so we don't run through GDB. So: Microchip has no formal plans to expand this offering, but I would be open to supporting this effort were it to get some momentum. To keep our core functionality separate from these 'side-projects', the code in the repo you refer to has been adapted into this non-Microchip repo: https://github.com/mraardvark/pyavrdebug which depends directly on functionality inside pymcuprog. Yes, it would be nice to expand this further (but at this point its not formally on our radar)