Go Down

Topic: New optiboot; beta testers welcome... (Read 115 times) previous topic - next topic

westfw

Note that the optiboot hex file for 1284 will NOT work in a 644 (or at least is not expected to work), because the bootloader is located at the end of flash memory, and that's in a different place on the two chips.  AVR code usually contains at least some absolute address references...

skyjumper


Note that the optiboot hex file for 1284 will NOT work in a 644 (or at least is not expected to work), because the bootloader is located at the end of flash memory, and that's in a different place on the two chips.  AVR code usually contains at least some absolute address references...


Bill, is this just a linker issue?

westfw

No, because it needs to know the internal address of the "Read While Write Flash" area in the source code as well (but the source already knows about 644p, so at least in theory if you can compile/link from source you shouldn't have any problems building a 644 version ("make sanguino")

However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.

skyjumper


No, because it needs to know the internal address of the "Read While Write Flash" area in the source code as well (but the source already knows about 644p, so at least in theory if you can compile/link from source you shouldn't have any problems building a 644 version ("make sanguino")

However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.


Thanks Bill, I did notice the Sanguino option in the list of targets, but I have not tried it, and didn't look to see what changed. If someone wants to try Optiboot with Sanguino, I'll build it and post it.


maniacbug


However, the 644 version predates my involvement and hasn't been tested, so i don't know whether it works.


Ditto here.  Never tested it.  If someone wants to send me a Sanguino, I'll make sure it works  :smiley-mr-green:

westfw

Quote
the 644 version predates my involvement and hasn't been tested

Well, now it's been tested.

It doesn't work.

It has the wrong signature for an ATmega644p (it makes it look like an ATmega644.)
You can tell boards.txt that you have a 644 and upload will work, but then the pins_arduino.c doesn't get correct values.
(and why does it have an incorrect signature byte?  Because avr-libc is actually wrong in the version that ships with Arduino.  It's not even an optiboot bug.  Sigh.  https://savannah.nongnu.org/bugs/?26188

It also has an incorrect efuse value in the Makefile (should be 0xFD, with the "unused" bits set to 1, but the makefile has 0x05)

http://code.google.com/p/optiboot/issues/detail?id=61

Markus_L811


Quote
the 644 version predates my involvement and hasn't been tested

Well, now it's been tested.

It doesn't work.

It has the wrong signature for an ATmega644p (it makes it look like an ATmega644.)
You can tell boards.txt that you have a 644 and upload will work, but then the pins_arduino.c doesn't get correct values.
(and why does it have an incorrect signature byte?  Because avr-libc is actually wrong in the version that ships with Arduino.  It's not even an optiboot bug.  Sigh.  https://savannah.nongnu.org/bugs/?26188

It also has an incorrect efuse value in the Makefile (should be 0xFD, with the "unused" bits set to 1, but the makefile has 0x05)

http://code.google.com/p/optiboot/issues/detail?id=61



First thanks for making it an issues, second that brings me some light on the fact that all from me testet bootloaders does't work sometimes about the Signature or that i have to change the build.mcu to the version without the "P" at the end.

westfw

The source at http://code.google.com/p/optiboot/ has been fixed, and I've added a .hex file for 644p to the download area.

It's still tagged as v4.5, since this didn't change any object code of previously supported platforms.  And like the 1284p support, the 644p is not an official Arduino team platform, so this won't be committed to the Arduino repository until it's time for some sort of big "upgrade."

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Markus_L811


The source at http://code.google.com/p/optiboot/ has been fixed, and I've added a .hex file for 644p to the download area.

It's still tagged as v4.5, since this didn't change any object code of previously supported platforms.  And like the 1284p support, the 644p is not an official Arduino team platform, so this won't be committed to the Arduino repository until it's time for some sort of big "upgrade."

Yeah, cool, thanks!

Did you fix the problem with the second UART too?

CrossRoads

What problem with the second UART?

You use Serial.begin(speed);
and Serial1.begin(speed);
What problem?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

westfw

#266
Mar 11, 2012, 08:33 pm Last Edit: Mar 11, 2012, 11:07 pm by westfw Reason: 1
(the bootloader currently only supports uart 0, on devices with more than one uart.)
No, not changed yet.  Working on it...

If you were having trouble at the sketch or C level, that might have been due to the differences between 644 (which apparently only has one uart) and 644A/644P (which have two.  Even though 644A has the same signature as 644.  "Bad Atmel!")

retrolefty


(the bootloader currently only supports uart 0, on devices with more than one uart.)
No, not changed yet.  Working on it...

If you were having trouble at the sketch or C level, that might have been due to the differences between 644 (which apparently only has one uart) and 644A/644P (which have two.  Even thought 644A has the same signature as 644.  "Bad Atmel!")



That is rather bizarre when it's the mothership at fault (or partial fault) sometimes. We depend on her for so much.  ;)

nicman

westfw,

Back in August of last year, I found your request for beta testers, downloaded the optiboot_atmega328.hex file (June 2011 version).  I've been using since then, without problems.  I'm getting ready to burn the bootloader on another ATMEGA328 chip, and would like to know what the latest-and-greatest bootloader you recommend, and where I can download it from.  I went here: http://code.google.com/p/optiboot/downloads/list

If this is the right place, do I choose Optiboot v4.4?  How is this different from the optiboot_atmega328.hex file that comes with Arduino 1.0?

Your help is greatly appreciated.  Thanks in advance.

westfw

Quote
do I choose Optiboot v4.4?

Probably.  Unless you need one of the "features" added since then (m1284 and m644 support, and some changes to support newer versions of the compiler.)

Quote
How is this different from the optiboot_atmega328.hex file that comes with Arduino 1.0?

The optiboot_atmega328.hex file that comes with Arduino 1.0 is identical to the hex file is identical to the v4.4 download from the optiboot.  The mercurial source tree is slightly newer (v4.5) and has the changes I mentioned...

Go Up