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

added updi support and test devices #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Florin-Popescu
Copy link

Hello!

I was very happy to see that avarice is now on github. And thanks to @maxgerhardt and Joerg for pushing me to upstream my changes.

This PR contains my changes for UPDI support for the newer AVR families. This is very similar to existing PDI but:

  • communication is done over one bidirectional wire
  • initialization sequence is different, needs a separate device descriptor type
  • different access requirements for some memory regions (e.g. flash cannot be read byte by byte)
  • the new megaAVR0 or AVR8x family can have more than 8 fuses, but AVaRICE only supported up to 8

I discovered how to implement this mostly from Microchip EDBG-based Tools Protocols. I tried to keep a log for future reference on how I did this in the README of my fork from the old svn repo, in case anyone is curious. Hopefully Microchip will update their documentation if newer protocols emerge.

To use avarice in updi mode, passing the new argument -u or --updi is required. This argument was added to the already available protocols, and is mutually exclusive with the others, like -w, -x and probably others which default to JTAG.

I've added device descriptors supporting this new UPDI protocol for ATmega3208, 4808 and 4809. These can be used to test the implementation, or as models for supporting other UPDI devices. I'm preparing a different PR with the rest of the devices that I or other contributors added support for and tested on my fork, but they are not all necessarily UPDI related.

Any feedback is appreciated. I've just implemented something which works for me and haven't tested thoroughly or haven't bothered making the code "pretty".

@Florin-Popescu
Copy link
Author

Any news on merging this?

@maxgerhardt
Copy link
Collaborator

Sorry I've been hung up on other projects, I'd love taking a look at this soon.

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

Successfully merging this pull request may close these issues.

2 participants