ATtiny programming using Eclipse with USBtiny
Eclipse is a great environment for creating arduino programs .
The cool plugin from Jan Baeyens http://www.baeyens.it/eclipse/ is almost perfect.
If you are using a external programer like the USBtiny, you cannot directly upload the hex file.
The solution is to create an external tool configuration.
The setup will prompt for a file and call avrdude with the defined parameters.
[codesyntax lang=”actionscript”]
-v -C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p attiny85 -c usbtiny -P usb -U flash:w:${file_prompt}:i
[/codesyntax]
You want to select the second option, otherwise all projects will be build.
The upload can be started with the entry you have just created:
Now you can select the hex file:
Finally avrdude is uploading to the ATtiny attached to the programmer.
ATtiny85 using ArduinoISP
[codesyntax lang=”actionscript”]
-v -C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p attiny85 -c stk500v1 -P COM7 -b 19200 -U flash:w:${file_prompt}:i
[/codesyntax]
ATtiny85 using USBTiny but no prompt
You need to select the project first.
[codesyntax lang=”actionscript”]
-v -C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p attiny85 -c usbtiny -P usb -U flash:w:${container_loc}\Release${project_path}.hex:i
[/codesyntax]
Burn fuses of ATtiny85 using USBTiny
http://www.engbedded.com/fusecalc
Burn Fuses for ATtiny85 – 8Mhz
-U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[codesyntax lang=”actionscript”]
-C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p attiny85 -c usbtiny -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[/codesyntax]
Burn Fuses for ATtiny85 – 1Mhz = 8MHz / 8
-U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[codesyntax lang=”actionscript”]
-C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p attiny85 -c usbtiny -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[/codesyntax]
Pro Mini – MEGA328P using USBTiny
-U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
[codesyntax lang=”actionscript”]
-v -C C:\arduino\arduino-1.5.2/hardware/tools/avr/etc/avrdude.conf -p atmega328p -c usbtiny -P usb -U flash:w:${container_loc}\Release${project_path}.hex:i
[/codesyntax]