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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug support for microchip development boards #8

Open
sstaub opened this issue Oct 30, 2020 · 12 comments
Open

debug support for microchip development boards #8

sstaub opened this issue Oct 30, 2020 · 12 comments
Labels
enhancement New feature or request

Comments

@sstaub
Copy link

sstaub commented Oct 30, 2020

The official development boards from microchip like the Curiosity Nano 4809 have a build in debug adapter.
Hope you find a way to use it.

@valeros valeros added the enhancement New feature or request label Oct 30, 2020
@maxgerhardt
Copy link
Contributor

+1.

A fork of avarice at https://github.com/Florin-Popescu/avarice can reportedly open a gdbserver using the EDGB programmer / debugger via the UPDI interface. But not some other devices of a different class, see issue. Would love to see avarice development continue and being integrated here.

@paulskirk53
Copy link

Hi, It would be great to see support for debugging on chips such as megaavr4809. My background is programming in C# to write drivers for astronomy equipment (using the ASCOM standard) and programming Arduino mega2560 boards to control robotics stuff. I am retired and if there's anything I can do to help (e.g. testing) I am happy to commit time on a regular basis. I hope this helps. I am new to Platformio, but just to observe that continual enhancement of the platform to include support for new boards etc is a key to engagement with PIO. I know it all takes a lot of time and commitment - thanks to all involved.
Paul

@mraardvark
Copy link

Basic debugging is possible with:

https://github.com/stemnic/pyAVRdbg

(I hope to take this further when I get time... :/ )

@maxgerhardt
Copy link
Contributor

For reference, see also issue stemnic/pyAVRdbg#8 -- would be nice to test this with an Atmel-ICE device, and maybe someday the final frontier, getting it to work with the built-in programming bridge chips on some boards like the Arduino Nano Every, might be achieved.

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Mar 16, 2021

FYI: Using an Arduino Pro Micro (ATMega32U4) loaded with the https://github.com/MCUdude/microUPDI firmware for the debug probe, https://github.com/stemnic/pyAVRdbg as the GDB server and a Arduino Nano Every as target board (which has the needed UPDI pin on a pad at the bottom) we have made progress to get a working debugger in PlatformIO, see topic :)

grafik

Some things are still missing though -- you can't load the firmware over the GDB server and I also don't yet know how to reset the target chip. I've opened issues for that..

@mraardvark
Copy link

Nice work :)
Out of interest - did you try it with your Atmel-ICE as well?

@maxgerhardt
Copy link
Contributor

I don't have such an expensive debug probe sadly 😅

@mraardvark
Copy link

Ah, sorry - I thought you mentioned one earlier. A fictitious one then :)
Reason I was asking is that the mEDBG (mega32U4) is a horrible UPDI bit-banger, and I would like to know how it performs.
Sawing the nEDBG off a Curiosity Nano would yield a nicer UPDI driver...

@MCUdude
Copy link
Contributor

MCUdude commented Jan 25, 2022

I have absolutely no experience with avarice or setting up an environment capable of debugging an AVR, and the last time I had to use a hardware debugger to figure out what was going on, I loaded the elf file from PlatformIO into Atmel Studio, which to my surprise actually worked! However, it would be really nice to have AVR hardware debugging working together with PlatformIO.

It looks like the AVaRICE project has been migrated over to Github: https://github.com/avrdudes/avarice

There's a branch where there has been some recent activity too: https://github.com/avrdudes/avarice/tree/jputcu_dev

I haven't read all the forums posts regarding this topic, so what more needs to be done before avarice+avr-gdb works with VSCode+PlatformIO (as long as the platformio.ini file is set up correctly)? I'd love to help out if possible, I have access to most AVR debuggers, so I can at least help out with testing.

@N0cynym
Copy link

N0cynym commented Jun 9, 2022

Hello I want to debug avr128dx MCUs and saw that that pkobn_updi is used for uploading.
MegaCoreX MCUs using jtag2updi. Does any updi protocol now work for debugging?

@MCUdude
Copy link
Contributor

MCUdude commented Jun 9, 2022

PlatformIO does not currently support AVR debugging. You can, however, debug through Atmel Studio by loading the .elf file that the compiler spits out.

@N0cynym
Copy link

N0cynym commented Jun 10, 2022

so is this basically a updi protocol issue or much more which needs tbd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants