0

I'm trying to use Sparkfun Pro Micro (5v 16MHz) as ISP to program Attiny chips (OS:Windows10Pro). I followed instructions. Installed proper driver and added Sparkfun boards to ArduinoIDE:

enter image description here

Using Arduino IDE uploaded ArduinoISP sketch on it. As you can see there are two options available to choose for programmer:

  1. Arduino as ISP
  2. Arduino Leonardo/Pro Micro as ISP

enter image description here

Which unfortunately both of them give the same error:

Sketch uses 28 bytes (2%) of program storage space. Maximum is 1024 bytes.
Global variables use 0 bytes (0%) of dynamic memory, leaving 64 bytes for local variables. Maximum is 64 bytes.
C:\Users\K1\AppData\Local\Arduino15\packages\MicroCore\tools\avrdude\7.1-arduino.1/bin/avrdude -CC:\Users\K1\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.3.0/avrdude.conf -v -pattiny13a -cstk500v1 -PCOM16 -b19200 -Uhfuse:w:0xff:m -Ulfuse:w:0b00111010:m -Uflash:w:C:\Users\K1\AppData\Local\Temp\arduino_build_207900/sketch_aug28a.ino.hex:i 

avrdude: Version 7.2
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\K1\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\2.3.0\avrdude.conf

Using Port                    : COM16
Using Programmer              : stk500v1
Overriding Baud Rate          : 19200
avrdude stk500_recv() error: programmer is not responding
avrdude stk500_getsync() warning: attempt 1 of 10: not in sync: resp=0x00
avrdude stk500_recv() error: programmer is not responding
avrdude stk500_getsync() warning: attempt 2 of 10: not in sync: resp=0x00
...
     
avrdude done.  Thank you.
the selected serial port 
 does not exist or your board is not connected

I tried avrdude in command line with these parameters and got the same results:

avrdude -p attiny13a -P COM16 -c avrisp -b 19200 -U flash:w:r.hex -v

I also found out that issue most probably has nothing to do with:

  • Target chip that I'm using: because changing it has no effect
  • Wiring: because even when there is no chip connected to SPI pins of ProMicro I get the same error
  • USB cable is good: I can upload sketches successfully to Pro Micro but cannot use it as ISP and replaced cable to rule that probably out.

This is while in this video the guy does what I want easily and has no issues whatsoever: https://www.youtube.com/watch?v=7Rz9A9VbDx4

Any ideas appreciated.

1 Answer 1

1

GOTCHA... After two days of search and speculation finally found the solution:

Short answer: In avrdude command instead of -c avrisp use -c arduino:

avrdude -p attiny13a -P COM16 -c arduino -b 19200 -U flash:w:r.hex -v

Long answer: My target chip was ATtiny13a, so I had to use MicroCore v2.3.0 which is the only core supporting ATtiny13 for Arduino. Contrary to other cores, in this core's programmers.txt list, each entry should have a upload.protocol line:

arduinoasispatmega32u4.upload.protocol=

otherwise it will give this error:

avrdude programmer_not_found() error: cannot find programmer id {upload.protocol}

I have added this line before to make that error go away but apparently with wrong parameter of stk500v1 that I have imitated from fabric entries! Converting this parameter to arduino solved the problem. This is what that entry should look like for ATtiny13 of MicroCore v2.3.0 (\packages\MicroCore\hardware\avr\2.3.0\programmers.txt):

arduinoasispatmega32u4.name=Arduino Leo/Micro as ISP
arduinoasispatmega32u4.communication=serial
arduinoasispatmega32u4.protocol=arduino
arduinoasispatmega32u4.upload.protocol=arduino
arduinoasispatmega32u4.speed=19200
arduinoasispatmega32u4.program.protocol=arduino
arduinoasispatmega32u4.program.speed=19200
arduinoasispatmega32u4.program.tool=avrdude
arduinoasispatmega32u4.program.extra_params=-P{serial.port} -b{program.speed}

For other cores, like ATTinyCore v1.5.2 (\packages\ATTinyCore\hardware\avr\1.5.2\programmers.txt) no such line is needed hence this entry works fine:

arduinoasispatmega32u4.name=Arduino Leo/Micro as ISP
arduinoasispatmega32u4.communication=serial
arduinoasispatmega32u4.protocol=arduino
arduinoasispatmega32u4.speed=19200
arduinoasispatmega32u4.program.protocol=arduino
arduinoasispatmega32u4.program.speed=19200
arduinoasispatmega32u4.program.tool=avrdude
arduinoasispatmega32u4.program.extra_params=-P{serial.port} -b{program.speed}

Also you should update avrdude in the Arduino core manually: Download latest release from HERE, and replace them IDE's related files. If you can not find them take a look at HERE. If avrdude is not updated you might get an error like this:

Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
avrdude: Version 6.3-20201216
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch
         System wide configuration file is "C:\Users\K1\AppData\Local\arduino15\packages\MicroCore\hardware\avr\2.3.0/avrdude.conf"
avrdude: error at C:\Users\K1\AppData\Local\arduino15\packages\MicroCore\hardware\avr\2.3.0/avrdude.conf:421: syntax error
avrdude: error reading system wide configuration file "C:\Users\K1\AppData\Local\arduino15\packages\MicroCore\hardware\avr\2.3.0/avrdude.conf"

Third Solusion: Use this App with this configuration: enter image description here

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.