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".
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:
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".