I am trying to use avrdude with a Mega2560 running ArduinoISP
Note: I have the 10uF cap on the Mega2560 RESET line as described by Ardunio.
Also, I am using avrdude/6.3 on Windows 10. The Mega2560(ArduinoISP) is connected to the PC using an a USB cable - connection is COM8.
I have a couple of tasks I want to do
- Update the firmware on my USBASP
- Load Arduino boot on ATTINY85 dev board.
I started with Arduino IDE but moved to avrdude to better understand the problem
For #1: Wired it per https://www.arduino.cc/en/Tutorial/ArduinoISP
AVR-ISP pin MEGA-ISP pin
6/10 (name)
1/9 (MISO) 50
2/2 (VCC) VCC
3/7 (SCK) 52
4/1 (MOSI) 51
5/5 (RESET) 53
6/10 (GND) GND
I tried using the command:
avrdude -c arduino -p m8 -P COM8
I get the error
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xed
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0
avrdude done. Thank you.
--UPDATE-- The error above was caused by not setting the BAUD rate. Now I get:
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
What I really want to know is more of how this process works so I can better understand it and be able to debug the issues.
- Is this an error communicating with the ISP (Arduino) or is it an issue with the ISP talking to the target (ATMega8B on USBAVR)?
- What does "stk500" mean? Is that the programming protocol, the ISP protocol, or something all together different?
- Is this all documented somewhere?
-c arduino
should be-c avrisp -b 19200