Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIO Unified Debugger for AVR #95

Open
ivankravets opened this issue Jun 4, 2018 · 10 comments
Open

PIO Unified Debugger for AVR #95

ivankravets opened this issue Jun 4, 2018 · 10 comments

Comments

@ivankravets
Copy link
Member

ivankravets commented Jun 4, 2018

Problems

  1. We would like to add debugging support for AVR but we can't. Sorry 馃槥
  2. Microchip does not provide GDB debugging server, all their tools are PROPRIETARY.
  3. They hardcoded debugging to their MPBLAB IDE and use custom proprietary and paid toolchain (not GCC).

So, Microchip is not interested in the free and multi-platform debugger for AVR.

You can try to reach them personally and ask about help https://microchipsupport.force.com/s/

@PLorand
Copy link

PLorand commented Jul 10, 2018

Maybe these can be used as a reference:
https://www.avrfreaks.net/forum/tutsoftgcc-avr-debugging-using-gdb-and-avr-dragon-under-linux-ubuntu
https://github.com/Lahorde/arduino_avr_template_avr_plugin/blob/master/README.md
http://dspace.org.nz/?p=593

I don't see why this functionality couldn't be implemented into PlatformIO to simplify the whole process and make it a one-click procedure (as advertised) for debugging AVR.

@aster94
Copy link

aster94 commented Jan 3, 2019

hello, have you seen this?
https://github.com/dcwbrown/dwire-debug

@vindicatorr
Copy link

@aster94 I came across that today and was very hopeful of making use of it... buuuuut I was bummed to find that atmega16 doesn't have the capability to use it, only JTAG.
I keep coming across avarice and may look into that more.

@cebas
Copy link

cebas commented Nov 18, 2019

Hi @ivankravets , I would love to be able to debug on my arduino uno. Is there any progress on this feature?
Thanks

@jxsl13
Copy link

jxsl13 commented Apr 6, 2020

Highly requested feature.

@koluckirafal
Copy link

It looks like it would be possible to use AVaRICE debugger server to interface GDB with JTAG/ICE debugger.
Someone on PlatformIO forums was already trying to use it with mixed results: https://community.platformio.org/t/atmega32-debugging-with-avarice-and-avr-gdb/15960

@barrydegraaff
Copy link

Hello, I would also like to see AVR debugger support in PlatformIO, even though I can debug just fine over the command line.

Attached 2 documents that document how to debug using ONLY open-source software the Atmega 328p and Atmega 2560 using USB AVR JTAGICE MKII-CN:

debugging-atmega328_README.pdf

debugging-atmega2560_README.pdf

If a developer of PlatformIO is interested, I am willing to ship a USB AVR JTAGICE MKII-CN FOR FREE as donation, but only to a developer that can prove (by commits) they are actively involved in the project. Thanks!

@N0cynym
Copy link

N0cynym commented Dec 21, 2022

@ivankravets any updates about debugging AVR?

@maxgerhardt
Copy link

maxgerhardt commented Jan 15, 2023

I'm the CI maintainer of the AVaRICE program now, which is supposed to be able to use several debugging probes (Atmel-ICE, AVR Dragon, mEDBG, eDBG, ...) to open a GDB server. After some testing on real hardware (got an ATMega328P XPlained Mini with mEDBG probe on the way) and packaging of binaries I'll then be excited to bring these improvements into PlatformIO for AVR debugging support.

In parallel I've asked Microchip to expand their Python libraries (microchip-pic-avr-tools/pyedbglib) with a possible GDB sever as another posibility here.

@maxgerhardt
Copy link

maxgerhardt commented Jan 20, 2023

I am making slow but steady progress with AVaRICE on a ATMega328P XPlained Mini (mEDBG) board, incorporating a few patches, recompiling avr-gdb with XML support, and now I got PlatformIO + avarice + avr-gdb to load the firmware binary through debugWire, set a breakpoint and have it stop. Line by line debugging of the chip actually works.

grafik

Excited to test more and make it better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants