Hi,
I'm trying to burn a bootloader to my atmega8 with usbasp, and every time i try to burn it i get:
"efuse" memory type not defined for part "ATMEGA8"
Can anyone explain what that means and how i can fix it.
Thanks.
Hi,
I'm trying to burn a bootloader to my atmega8 with usbasp, and every time i try to burn it i get:
"efuse" memory type not defined for part "ATMEGA8"
Can anyone explain what that means and how i can fix it.
Thanks.
See page 215-216-217 of the datasheet
http://www.atmel.com/Images/Atmel-2486-8-bit-AVR-microcontroller-ATmega8_L_datasheet.pdf
Atmega8 only has High Fuse byte, Low Fuse byte.
"efuse" may refer to the Extended Fuse byte found on larger chips.
I don't know how to fix that. Is it a warning/error you can ignore and still have the bootoader function okay afterwards?
It's an error so it stops the burning process.
Hi,
I have the same problem. Any solution founf in the meantime?
How are you burning this bootloader, through the Arduino IDE?
What board do you have selected in the menu?
Need to select one near the bottom of the list:
Arduino NG or older w/Atmega8
No efuse here, so not clear where the error is coming from:
##############################################################
atmega8.name=Arduino NG or older w/ ATmega8
atmega8.upload.protocol=arduino
atmega8.upload.maximum_size=7168
atmega8.upload.speed=19200
atmega8.bootloader.low_fuses=0xdf
atmega8.bootloader.high_fuses=0xca
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=ATmegaBOOT-prod-firmware-2009-11-07.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F
atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino
atmega8.build.variant=standard
compared to Uno, which does have extended fuses
uno.name=Arduino Uno
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
uno.build.variant=standard
Hi,
I've got the same problem. I'm trying to burn a bootloader to an atmega8a with an Arduino Uno as ISP.
Arduino : 1.5.6-r2 (Mac OS X), Carte : "Atmega8 8MHZ"
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega8 -cstk500v1 -P/dev/tty.usbmodem1431 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:0xc2:m -Ulfuse:w:0xe4:m
avrdude: Version 5.11, compiled on Sep 2 2011 at 18:52:52
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/sim/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/tty.usbmodem1431
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
AVR Part : ATMEGA8
Chip Erase delay : 10000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
....
avrdude: verifying ...
avrdude: 1 bytes of lock verified
"efuse" memory type not defined for part "ATMEGA8"
avrdude: Send: Q [51] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude done. Thank you.
I think error comes from the initial argument in the command line:
-Uefuse:w:{bootloader.extended_fuses}:m
I tried to set efuse as 0x00 or 0xFF to inhibit the argument, but it does not work.
The program still exit with an error code as 1.
Next, i tried also in a terminal, without this argument. It works better, the program return a 0 exit code.
Now, i'm looking in the Arduino IDE 1.5 to avoid this argument for atmega8.
Also, i tried the method from Nick Gammon :
The sketch uploaded in the UNO works for burning an atmega8a.
But, i was unable to check if the bootloader works well or not.
I don't know if his bootloader blink by default (like bootloader from arduino ide).
I verified that the bug is present only on 1.5.x IDE.
On 1.0.x it work
Tested it on Win7-64
IDE 1.5.4
IDE 1.0.5
Any fix yet?
It's going to be a complicated fix; 1.5.x has a list of "rules" for accomplishing various tasks, and the rule for burning fuses ASSUMES that all the arduino "platforms" have all three fuses. I don't see an easy way to make the rule conditional on chip type.
Workaround: use some other tool for uploading the bootloader.
Opened an official bug:
I just ran into this problem. It still exists in Arduino IDE 1.5.8 BETA.
The boards.txt for the ATmega8 does not have a "extended_fuses" of course, and avrdude.conf does not have a "memory "efuse"" for the ATmega8 of course. If the Arduino IDE assumes that extended fuses are always used, all my projects with ATmega8 are in trouble.
As far as I know, there is no workaround, only using an older Arduino IDE will work.
If the Arduino IDE assumes that extended fuses are always used, all my projects with ATmega8 are in trouble.
The IDE only deals with the fuses when burning the bootloader; you just need to use some other tool for burning the bootloader. Optiloader will do it, Nick's utility will do it, "make atmega8_isp" was fixed in the optiboot repository to do it relatively recently (https://code.google.com/p/optiboot/source/detail?r=10fc00cb5232490b5acc9414d0212fe013343872), etc.
(Hmm. Note that optiboot is not the normal bootloader for an ATmega8, though.)
I have my ATmega8 on a board without connectors, so it is wires and clips. And I have my bootloader and boards.txt definition in version 1.5.8. It's gonna take some work anyway.
(the wires and clips remain the same regardless of whether you use "burn bootloader" from the IDE, or some other method for burning the bootloader.)
rahan:
Also, i tried the method from Nick Gammon :Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board
The sketch uploaded in the UNO works for burning an atmega8a.
But, i was unable to check if the bootloader works well or not.
I don't know if his bootloader blink by default (like bootloader from arduino ide).
It's not really "my" bootloader, it's the one I found in the bootloaders directory. I don't know whether or not it blinks any LEDs, however it should be simple enough to test whether it works, try uploading a sketch.
Just for interest I dug up an Atmega8 out of my parts drawer, and used the bootloader uploader to install the Atmega8 bootloader using my sketch Atmega bootloader programmer.
That worked OK, but I found I had to adjust the low fuse for the chip to use the 16 MHz crystal rather than the 8 MHz internal oscillator, which is what the bootloader expects (it expects 16 MHz).
Then I was able to upload the ASCII table sketch. I don't know what the bootloader is doing but there is about a 10 second delay from opening the serial monitor to when the sketch starts doing its stuff. Maybe that was in the days when you were supposed to hit Reset after uploading the sketch.
Yep. That's the way the old bootloader behaved.
Optiboot works fine on ATmega8, and the 1.5k of space that is saved is more significant there as well.
(Of course, you need a new/additional boards.txt...)