I need help getting the optiboot_ATmega8.hex file.
I've downloaded the latest optiboot v3 zip file ....installed everything......open Arduino IDE ...... I see a lot of OPTIBOOT boards but no Atmega8?
I guess I need to do something? The optiboot site says it's supported.
Did some research and found some files needed updating. Did that.
Now I see an entry with optiboot atmega8 in the IDE but get an error message that the optiboot_atmega8.hex dose not exist?
Did more research.....I think I need to MAKE it.
Tried to make it and I keep getting errors. I'm on WinXP SP3.
I'm not a programmer so I'm kinda lost :blush:
Can someone make me a optiboot_atmega8.hex please.
Do I also need a .LST file?
And is that all I'm missing to have a atmega8 optiboot?
(added 2/20)
Once you have the optiboot loaded on your mega8, don’t forget that you’ll need to edit boards.txt so that the arduino IDE knows how to talk to it (speed and max sketch size are different than the normal bootloader.)
It will depend on how much of a SW development environment you already have installed on your computer, and the type of computer. On my Mac, I already have the Mac developer tools installed, so I have utilities like "make" already available, which makes things easier. It OUGHT to be possible to build optiboot using only the files installed as part of the Arduino install (which includes make, the compiler, and a bunch of other tools, buried in that 100M+ of install), but that is (paradoxically?) more difficult...
In general:
1) Download the latest optiboot source from the mercurial repository (oh, you'll need mercurial as well!) Note that this is well past the latest .zip file (for example, it includes the atmega8 modifications.)
2) patch optiboot.c as needed or desired for assorted problems (see the google code "issue" list.)
3) patch the optiboot makefile to point most of the tools (compiler, avrdude) at the versions in the arduino distribution.
4) in a shell window, do "make atmega8"
Did you change the "boards.txt" file to include a "board" for the mega8 running optiboot?
The upload speed is different from the normal mega8 boards (the the max sketch size changes.)
I have:
I'm using an ATMEGA8-16AU 32pin SMD. If that make any difference. (For the fuses or something?)
Also using this setup: "Uploading Using an Arduino Board" section of this page http://arduino.cc/en/Tutorial/ArduinoToBreadboard
Well, I re-confirmed that it seems to work here, putting the mega8 into a duemilanove board.
I am having a hell of a time trying to get it to work in my SSS Arduino (with manual reset), however.
I'm going to check the timeouts and see if they are specified differently on mega8 vs mega328...
I can tell you that everything you need to build a bootloader is already on your computer.
The version of optiboot distributed with Arduino does not yet include support for atmega8.
Here's hex code for an 8MHz atmega8. Not tested this time; YMMV, and watch your fuse settings...
I'm calling this version 4.2 (calling the latest Arduino version, 4.0 being the source from mercurial, and .2 being two sets of significant edits by me.) If you look closely you'll see the number 0402 at the end of flash space.
Do I also need to add a section to me board.txt? (Like I did last time.)
yes, of course, because sketches will also need to be compiled taking into account the correct clock rate. (one begins to understand why the "project setup" phase of "real" development environments is so much more complex than the Arduino selection of a "board." Things like the chip, the clock rate, whether there is an external crystal or not, etc are all SEPARATE options that aren't necessarily related to one another...)
OK but to create a valid section in the board.txt for this new chip/bootloader I guess I need to know what fuse setting you chose to build the .hex file?
Last time you gave me this for the 16mhz atmega8:
opti8.name=Arduino Optiboot8
opti8.upload.protocol=stk500
opti8.upload.maximum_size=7680
opti8.upload.speed=115200
opti8.bootloader.low_fuses=0xbf
opti8.bootloader.high_fuses=0xdc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_mega8.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=16000000L
opti8.build.core=arduino
So would this work for a atmega8 at 8mhz? Red sections are what I've changed
opti8.name=Arduino Optiboot8 (8mhz)
opti8.upload.protocol=stk500
opti8.upload.maximum_size=7680
opti8.upload.speed=57600
opti8.bootloader.low_fuses=0xa4
opti8.bootloader.high_fuses=0xdc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_mega8_8mhz.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=8000000L
opti8.build.core=arduino
I guess I need to know what fuse setting you chose to build the .hex file?
No, I don't think so. The bootloader doesn't actually know about the fuse settings, it only knows about the clock speed and where it needs to be in memory. The new low fuse byte of A4 sounds right for the internal oscillator, but the upload speed should still be 115200; it would only be 57600 if you were using the old bootloader that thought it was still running at 16MHz.