Pages: 1 [2]   Go Down
Author Topic: Optiboot for Atmega8 needed.  (Read 5958 times)
0 Members and 1 Guest are viewing this topic.
Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for helping out again westfw.

Do I also need to add a section to me board.txt? (Like I did last time.)
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6806
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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...)
Logged

Gatineau, Qu
Offline Offline
Jr. Member
**
Karma: 1
Posts: 94
Did you Arduino today?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6806
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the atmega8 8MHz optiboot.  Will try it out.
Logged

Pages: 1 [2]   Go Up
Jump to: