Thanks, tf68!
It works!
I can get it to upload reliably now by using /dev/ttyACM0 and pressing the reset button beforehand.
The (UDEV) link in the subfolder does indeed not work. However, I can get the ttyACM number. This is important since I have one MICRO and two LEONARDO boards that need to be identified correctly before uploading. The UDEV rule does this as it should. Then I use the number for the ttyACM.
However my problem is that the Micro is inside of a closed box with no access to the reset button.
I cannot add a hardware button on the reset pin because the units and pcbs are already built.
So, I somehow need a command line reset.
Using avrdude -c arduino -p m32u4 -P /dev/ADM0 -b 1200
seems to work at first glance when looking ar the board but gives me this error:
ioctl ("TIOCMGET"): Input/output error
Using avrdude -c avr109 -p m32u4 -P /dev/ADM0 -b 1200 returns:
Connecting to programmer
avrdude: butterfly recv(): programmer is not responding
Found programmer: Id = "?"; type =
Software Version = ?.? Hardware Version = ?.?
avrdude: error: buffered memory access not supported.
Maybe it isn't a butterly/AVR109 but a AVR910 device?
avrdude: initialisation failed, rc=-1
Double check connections and try again, or use -F to override this check.
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader
avrdude done. Thank you.
(the "?" characters are som unreadable korean looking characters)
I was doing a search for "avrdude command line reset" but only found suggestions for Windows but not Linux.
There must be something since I don't have to push the reset button when uploading from the IDE software.