In the meantime my /dev/ttyACM3 changed to /dev/ttyACM0
And now I have my previous problem.
Is it connected with the size of the hex file.
This one is too big:
/usr/local/avr/bin/avrdude -pm2560 -cstk500v2 -P/dev/ttyACM0 -b115200 -Uflash:w:AVR_hello.hex:a -v -v -B 333
avrdude: Version 5.11.1, compiled on Mar 12 2012 at 15:10:07
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/avr/etc/avrdude.conf"
User configuration file is "/home/przemek/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : stk500v2
Overriding Baud Rate : 115200
Setting bit clk period : 333.0
avrdude: stk500v2_set_sck_period(): p = 333.0 us too large, using 276.7 us
AVR Part : ATMEGA2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 8.7 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9801
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "AVR_hello.hex"
avrdude: input file AVR_hello.hex auto detected as Intel Hex
avrdude: writing flash (42756 bytes):
Writing | ################################################# | 98% 6.05savrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
This is working correctly:
Launching /usr/local/avr/bin/avrdude -pm2560 -cstk500v2 -P/dev/ttyACM0 -b115200 -D -Uflash:w:AVR_hello.hex:a
Output:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9801
avrdude: reading input file "AVR_hello.hex"
avrdude: input file AVR_hello.hex auto detected as Intel Hex
avrdude: writing flash (42724 bytes):
Writing | ################################################## | 100% 6.16s
avrdude: 42724 bytes of flash written
avrdude: verifying flash memory against AVR_hello.hex:
avrdude: load data flash data from input file AVR_hello.hex:
avrdude: input file AVR_hello.hex auto detected as Intel Hex
avrdude: input file AVR_hello.hex contains 42724 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 4.79s
avrdude: verifying ...
avrdude: 42724 bytes of flash verified
avrdude done. Thank you.
avrdude finished