Clues on the interwebs have pointed towards toggling the DTR signal of the com port (by use of -c arduino). But when I try to use this it hangs (I just replaced "wiring" with "arduino").
Should I include the baud rate in the command, or is this already catered for by specifying m2560? Any help (by way of complete commands) would be appreciated.
I think it's a hardware problem then. The board is flashed twice every 5 minutes, continuously. Perhaps there's a defect in the memory. Or a problem with the USB - I moved to another, lets see.
Same issue, sometimes works fine (90% of the time, it works every time).
Here´s the error when I try to flashg when it´s in a non-responsive state.
avrdude -c wiring -P com12 -p atmega2560 -b115200 -U flash:w:minus1.hex:i
avrdude: ser_open(): can't set com-state for "\.\com12"
avrdude: ser_drain(): read error: Controlador no vßlido.
The problem can be resolved by replugging the USB. I was looking into a way with "mountvol com12 /d" "mountvol com12" to mimic this reset everytime, but as the arduino board isn´t a volume I didn´t find a way to do this.