0

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

  1. Update the firmware on my USBASP
  2. 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.

  1. Is this an error communicating with the ISP (Arduino) or is it an issue with the ISP talking to the target (ATMega8B on USBAVR)?
  2. What does "stk500" mean? Is that the programming protocol, the ISP protocol, or something all together different?
  3. Is this all documented somewhere?
17
  • baud rate, fuses? use IDE to burn the botloader
    – Juraj
    Commented Jun 3, 2019 at 5:27
  • I get similar errors when I try to use the IDE (which I believe uses avrdude in the bacground. That is why I am focused on understanding avrdude. Note: I normally use the IDE but not with a ISP. Commented Jun 3, 2019 at 5:46
  • 1
    Please add info about the wiring. Commented Jun 3, 2019 at 5:49
  • Added wiring info Commented Jun 3, 2019 at 14:33
  • 1
    I think -c arduino should be -c avrisp -b 19200
    – Gerben
    Commented Jun 3, 2019 at 14:36

1 Answer 1

3

The target board was not reset.

The "Arduino as ISP" sketch uses pin 10 to reset the target, not the SS pin. So even on Mega, wire reset of target to pin 10, not to pin 53. enter image description here

Is this an error communicating with the ISP (Arduino) or is it an issue with the ISP talking to the target (ATMega8B on USBAVR)?

the first error "not in sync" is a problem with communication with the programmer. it was caused by wrong baud rate. the "invalid signature" is a response from the programmer about target. if the signature could be read avrdude would print the target MCU type. all zeros signature is when the target doesn't answer. so check the wiring.

What does "stk500" mean? Is that the programming protocol, the ISP protocol, or something all together different?

yes it is a ISP programming protocol. the "Arduino as ISP" implements only this protocol

Is this all documented somewhere?

this is AVR MCU world, not Arduino. you can google avrdude reference, stk500 reference etc

4
  • This got it working. How did you know it was the reset? Commented Jun 4, 2019 at 14:36
  • I use "Arduino as ISP" quite often. You could accept the answer to mark the question solved
    – Juraj
    Commented Jun 4, 2019 at 15:12
  • Just recall that the question was not just to solve the immediate issue; but, to know how to trace the symptoms to the cause. If you can add how the symptoms pointed you to the RESET connection then that would be a more complete answer. Also I need to test it with the other test case. Commented Jun 4, 2019 at 22:50
  • the "check the wiring" rule. I enhanced the answer
    – Juraj
    Commented Jun 5, 2019 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.