avrdudes / avrdude

AVRDUDE is a utility to program AVR microcontrollers
GNU General Public License v2.0
650 stars 124 forks source link

Which programmer supports "-E reset"? #1711

Open Tropaion opened 4 months ago

Tropaion commented 4 months ago

Hello, I don't know where to ask/find it. I have an application, where, when the programming an ATxmega32E5 is done, the reset signal should stay activated until said otherwise. I have the programmers AVRISP MK2 and Atmel ICE and tried both. With both it says "avrdude warning: -E option not supported by this programmer type", but I can't find anywhere, which programmers support this. So, can someone tell which programmer I should use?

stefanrueger commented 4 months ago

Good question! Originally -E was implemented for parallel programmers (remember the parallel port for printers from the last millennium?). Only a couple of other programmers followed suit. Looking at the source code we have

$ grep "parseexitspecs *= *[^=]" -r src
src/pgm.c:  pgm->parseexitspecs = NULL;
src/par.c:  pgm->parseexitspecs = par_parseexitspecs;
src/linuxspi.c:    pgm->parseexitspecs = linuxspi_parseexitspecs;
src/flip2.c:  pgm->parseexitspecs   = flip2_parseexitspecs;

Maybe the hardware pros amongst the team can help out with alternative ways of doing what you want to achieve... @mcuee @MCUdude

Tropaion commented 4 months ago

remember the parallel port for printers from the last millennium?

I'm too young for that, but I think I know what you mean 😄 . I currently have an working but not very nice solution. I keep an python thread running in the background which keeps avrdude open in terminal mode, but sometimes this creates some annoying issues. This was also the reason I came upon the "-E" command while searching for alternatives.

mcuee commented 4 months ago

@MCUdude

I think you are more familar with Microchip tools like Atmel ICE. Maybe you can help to see if we can offer such an options for some of the programmers.

mcuee commented 4 months ago

@stefanrueger and @MCUdude

I think we can probably implement such an option for programmers which can toggle the reset pin at different state.

linuxgpio should be one candidate. @stefanrueger mentioned that linuxspi already has -E support.

We have some programmers which have similar functions, not using -E. I think serialupdi is one example.

MCUdude commented 4 months ago

I'll look into what it would take to implement this for jtag3 programmers.

@dioannidis I don't know much about the USBasp firmware, but it is possible to leave the reset pin low after programming?

Tropaion commented 4 months ago

@MCUdude That would be really nice, especially for Microchip tools. But I'm really surprised that this topic never came up if you consider how long avrdude exists.

dioannidis commented 4 months ago

@MCUdude

@dioannidis I don't know much about the USBasp firmware, but it is possible to leave the reset pin low after programming?

IIRC yes it's possible but let me check to confirm

MCUdude commented 4 months ago

I'll look into what it would take to implement this for jtag3 programmers.

I've been in contact with the Microchip developers who are in charge of the JTAG3/EDBG firmware. It's not possible to leave the reset pin low after a programming session, so there is not much we can do about this...

IIRC yes it's possible but let me check to confirm

@dioannidis thank you! The USBasp is the go-to programmer for lots and lots of people. If this was possible, the USBasp just became a little more useful!