[RFC] XMEGA PDI programming with a AM335x processor

Dear all,

This is a request for comments/testers/reviewers :slight_smile:

Avrdude is a known tool to flash firmware on amount of AVR devices,
I've been working on add XMEGA PDI programming support using the
Programmable Realtime Unit (PRUSS) available on AM335x based boards
like Beaglebone Black. With this you can program an XMEGA in-circuit
without requiring any external hardware. The programmer needs a custom
firmware that needs to be loaded to the PRU [1], avrdude loads the
firmware and communicates with it to be able to program the firmware
on XMEGA, the code is available here [2] and the specific commit that
adds support for it is here [3]. It works doing

avrdude -p atxmega16d4 -c pruss -e -U flash:w:my-firmware.hex

But there is still an issue that I need to solve, though I have a
workaround to make it work. I'm pretty sure that the problem is in the
PRU firmware side so not a problem with avrdude. Nevermind if you want
to help test, review or give me your comments all are welcome. Do not
hesitate to contact me if you are interested on this, either by email
or in the irc (nickname eballetbo). I hope have a stable version soon
but meanwhile, I repeat, if anyone would like to test all feedback is

Best regards,


[1] https://github.com/eballetbo/pdi-pruss
[2] https://github.com/eballetbo/avrdude
[3] https://github.com/eballetbo/avrdude/commit/ba3cb893cf3931033faeb4ebe0c296842f168cc7

Hi Enric,

This subject is very interesting, thanks for sharing it.

Unfortunately, I am newer on this subject, could give some guidelines or a draft or a similar tutorial of the following steps in order to be able to program an MCU xmega via PRU (beaglebone).

Many thanks,

Diogo Inacio

sexta-feira, 3 de Fevereiro de 2017 às 08:45:54 UTC, eballetbo escreveu: