I’m trying to use Arduino 1.8.15 with an Arduino Mega (ATmega2560) and an ISP-Programmer on Linux.
Programmer works fine with standalone avrdude -P /dev/ttyACM0 -p m2560 -c avrisp2, so I set Tools→Programmer and Tools→Port accordingly. I verified that values were written correctly to ~/.arduino15/preferences.txt.
Unfortunately, when I hit ›Sketch→Upload Using Programmer‹ or ›Tools→Burn Bootloader‹ Arduino keeps to call avrdude with -Pusb and -cstk500v2 – which fails unsurprisingly.
Apparently "AVRISP Mk2" is a genuine Atmel Programmer that can only be talked to via USB port. AVRISP2 seem to mostly be clone programmers that are stk500v2 serial programmers plus a USB/Serial converter chip.
See if setting the programmer type to "Atmel STK500 board" works.
Use this code in your Linux terminal. I use it and it works great. I think you might have to reset your computer though but that only takes a minute. sudo usermod -a -G dialout $USER
Sorry for that late reply, but feedback might be helpful for someone with the same problem
That did work, thank you
You should read more carefully: programming manually via avrdude would not have worked if permissions were not set correctly in the first place – so no need to change them here. It wouldn’t have worked anyway: ttyACMx does not belong to group 'dialout' on my system, but to group 'uucp'