In this tutorial, I talk about how to burn (upload) Arduino
bootloader using USBasp programmer in general. In addition to easy and cheap,
this method is simple enough because of its concise wiring among Arduino and
USBasp board through SPI/ICSP port. Well, there is a problem will arise if you
would burn Arduino bootloader to ATMega8, the old one of AVR microcontroller family.
If you are using a bootloader uploading techniques according to tutorial in previous
article, you will encounter the following error:
Board: "Arduino NG or
older, ATmega8"
"efuse" memory
type not defined for part "ATMEGA8"
Step by step Burning Arduino Bootloader to ATMEGA8 using USBasp
Well, for the solution you can try all steps below. I have tried
and succeeded. But please be noticed, I use Arduino IDE 1.6.7 version, have not
tried in other version.
First, open file 'platform.txt' in folder 'C:\Program Files\Arduino\hardware\arduino\avr'.
This file is a kind of setting parameters for Arduino programmer tools. Next
add a few lines of settings as follows: (copy wrote on the bottom row of platform.txt
file)
tools.avrdude1.erase.pattern="{cmd.path}"
"-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol}
{program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m
-Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
tools.avrdude1.bootloader.params.verbose=-v
-v -v -v
tools.avrdude1.bootloader.params.quiet=-q
-q
tools.avrdude1.bootloader.pattern="{cmd.path}"
"-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol}
{program.extra_params}
"-Uflash:w:{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}:i"
-Ulock:w:{bootloader.lock_bits}:m
Second step, open file ‘boards.txt’ in same folder, then add
configuration settings as follows at the end of the file
atmega8.name=ATmega8
OPTIBOOT
atmega8.upload.protocol=arduino
atmega8.upload.maximum_size=7168
atmega8.upload.speed=115200
atmega8.upload.tool=avrdude1
atmega8.bootloader.low_fuses=0xbf
atmega8.bootloader.high_fuses=0xCC
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=optiboot/optiboot_atmega8.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F
atmega8.bootloader.tool=avrdude1
atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino
atmega8.build.variant=standard
You did it. Do not forget to save the files, okay?
It’s better to backup your original files in other folder, so if something went wrong, you can easily restore your default configuration
Third step, open your Arduino IDE application, then choose
Tools-Board menu. There should have been new additional submenu 'Atmega8
OPTIBOOT' for the specific purpose. If confused, please see the picture below
Your Arduino IDE now is ready, and next you can burn Arduino bootloader to ATMEGA8
accordance with the instructions in this article. Good luck …
ConversionConversion EmoticonEmoticon