Attiny84 and avrdude command line not working (SOLVED)

I’m trying to program an attiny84 on a custom board. For experimenting I’m using the blink sketch from the basic examples. I’m using an arduino nano with the arduino as isp sketch, and the 1.0.5 IDE.

I’m able to upload blink to the 84 using the IDE, however, when I try using the command line
avrdude -p attiny84 -c arduino -P com23 -U flash:w:blink.cpp.hex -v -v -v

I get the following error:

avrdude: stk500_getsync<>: not in sync: resp=0x00

any idea what I may be doing wrong?

Baud rate.

I've tried both the default baud rate (whatever that is) and 9600. Do you think I should drop it further?

Ok, so I tried the ArduinoISP.ino that you linked to, and got the same result. Afterword, I actually looked at the code and line for line it was what I was previously using. I also tried the now missing suggestion of the 0.1uF cap between power and reset on both devices without any luck.

I should also add that I'm running Winblows 7 64bit. Perhaps that is the issue? I think I still have XP on my wife's laptop (it came with Vista, but I downgraded it). Think that might help?

DBW1341: Think that might help?


The original problem was that you did not include the baud rate when executing avrdude from the command-line. The post above implies that is no longer the problem. Is this true...

I'm able to upload blink to the 84 using the IDE

I believe the answer to “Is this true…” is yes. I have tried including the baud rate when executing avrdude from the command line. The rate I included was 9600. Using that rate yielded the same error. I noticed that the ArduinoISP sketch used 19200, so I tried that and again received the same error.

To describe what the led indicators do during the process, I get the same indicators as when I reset the nano. First LED_PMODE rapidly blinks a couple times, the LED_ERR rapidly blinks twice then LED_HB does the heartbeat. That’s it.

When I use the IDE LED_PMODE will start indicating transfer, then after it’s done it’s back to heartbeat. But I don’t get that with the command line.

• Start the IDE

• Click [u]File[/u] then [u]Preferences[/u]

• Ensure [u]Show verbose output during: upload[/u] is checked

• Click [u]OK[/u]

• Upload an empty sketch (just setup and loop) to your t84 processor

• At the top of the status window (the black window on the bottom half of the IDE) is the command used to upload

• Note: you can use the mouse to select text in the status window and Ctrl+C to copy

How is that command different from your command?

avrdude -CD:\arduino-1.0.5\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny84 -cstk500v1 -P\.\COM23 -b19200 -Uflash:w:C:\Users\XXX\AppData\Local\Temp\build5457589275176235896.tmp\Blink.cpp.hex:i

Ok, so the differences are that the IDE specifies the location of the config file (it doesn't use the one in the avrdude folder

It adds an extra layer of verbose

It uses stk500v1 as the programmer instead of arduino

and it adds the format at the end of the -U command.

Utilising all off that, it works in the command line.

I should have looked at what the IDE output for the command was in the first place. I should have remembered that was in there.

Thank you very much.

Glad to know you have it working.

Ironically, after I got it working (repeatedly), I plugged the usb cable into my board and the connector snapped off, pulling the pads with it. Nice to know my soldering held, but sheesh!

The USB connector snapped off?