IDE 1.0RC1: is its Optiboot the "old" one?

It seems to me that the Optiboot of the latest IDE 1.0RC1 is still the "old" one, with its bugs and its issues...doens't it? I.E., it's not compatible with ArduinoISP or it doesn't correctly upload sketches greater than 30 kB.

Why developers did not integrate fixes introduces with Optifix by westfw?

+1

i make a test with fuebytes:

Bootloader at 0x7E00 is not readable

So this is the old bootloader.

Do you think to upgrade to Optifix after the RC1 ?

PLUS: The Optiloader do not work on new ide:

In file included from optiLoader.cpp:73:
/optiLoader.h:1:22: error: WProgram.h: No such file or directory
In file included from optiLoader.cpp:73:
optiLoader.h:6: error: 'byte' does not name a type
optiLoader.h:7: error: 'byte' does not name a type
optiLoader.h:8: error: 'byte' does not name a type
In file included from D:\Backup\Elettronica\Arduino\arduino-1.0-rc1\hardware\arduino\cores\arduino/Arduino.h:204,
                 from optiLoader.cpp:95:
D:\Backup\Elettronica\Arduino\arduino-1.0-rc1\hardware\arduino\variants\standard/pins_arduino.h:41: error: expected unqualified-id before numeric constant
D:\Backup\Elettronica\Arduino\arduino-1.0-rc1\hardware\arduino\variants\standard/pins_arduino.h:42: error: expected unqualified-id before numeric constant
D:\Backup\Elettronica\Arduino\arduino-1.0-rc1\hardware\arduino\variants\standard/pins_arduino.h:43: error: expected unqualified-id before numeric constant
optiLoader.cpp: In function 'void read_image(image_t*)':
optiLoader.pde:-1: error: 'struct image' has no member named 'image_pagesize'
optiLoader.cpp: In function 'boolean target_progfuses()':
optiLoader.pde:-1: error: 'struct image' has no member named 'image_progfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_progfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_progfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_progfuses'
optiLoader.cpp: In function 'boolean target_normfuses()':
optiLoader.pde:-1: error: 'struct image' has no member named 'image_normfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_normfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_normfuses'
optiLoader.pde:-1: error: 'struct image' has no member named 'image_normfuses'
optiLoader.cpp: At global scope:
optiLoader.pde:-1: error: too many initializers for 'image_t'
optiLoader.pde:-1: error: too many initializers for 'image_t'
optiLoader.pde:-1: error: too many initializers for 'image_t'
optiLoader.pde:-1: error: too many initializers for 'image_t'

AND Fusebytes do not work on new Ide:

fusebytes.pde:-1: error: 'Serial' was not declared in this scope
fusebytes.pde:-1: error: 'HEX' was not declared in this scope
fusebytes.pde:-1: error: 'Serial' was not declared in this scope
fusebytes.pde:-1: error: 'Serial' was not declared in this scope
fusebytes.cpp: At global scope:
fusebytes.pde:-1: error: variable or field 'print_binary' declared void
fusebytes.pde:-1: error: 'byte' was not declared in this scope

The bootloader you actually have on your board will have shipped with the board, NOT with the software distribution, unless you have specifically burnt a new bootloader.

Since it ships with hardware, and is difficult for a normal user to change, bootloader version changes are done more carefully than IDE changes.

(Still, I’d prefer to be getting either bug reports or “looking good” reports from the Arduino team…)

westfw: The bootloader you actually have on your board will have shipped with the board, NOT with the software distribution, unless you have specifically burnt a new bootloader.

I agre.... but the actual IDE contains the Optiboot...

Since it ships with hardware, and is difficult for a normal user to change, bootloader version changes are done more carefully than IDE changes.

...so I wished I would find a new Optiboot with a new IDE. Just to test. This let me think that the next boards will be shipped with the actual bootloader, if there's no new bootloader to test... :sweat_smile:

(Still, I'd prefer to be getting either bug reports or "looking good" reports from the Arduino team...)

+1

But when did westfw's optiboot improve became 'Arduino official'?

I never said this ;)

I only asked why Arduino developers didn't integrate the fixes introduced by westfw in his Optifix, because Optiboot issues are best known :sweat_smile:

westfw, do you have in planning update Optiloader and Fysebites for new Arduino IDE ?

But when did westfw's optiboot improve became 'Arduino official'?

The improvements are supposed to become official; I say they don't ACTUALLY become official till they ship.

do you have in planning update Optiloader and Fysebites for new Arduino IDE ?

Yes. Sigh.

I've update both optiLoader and fusebytes so that they compile under both 0022 and version 1.0 of the Arduino IDE. They're now stored in github at http://github.com/WestfW/

(the main changes: eliminate the use of "byte" as a data type (becomes uint8_t, which is standard but not nearly so beginner-friendly.) Eliminate includes of "WProgram.h" in favor of "hints" that cause the IDE to include either that or "Arduino.h" at an appropriate place in the sketch.)

They've each been tested "slightly."

westfw, tell me more about the “hints” mod, how does it work? is it a kind of wrapper?

the “hints” mod

The preprocessor adds the “#include <Arduino.h>” (or WProgram.h on older versions of the IDE) just before the first line it recognize as part of your C program. But it’s not great about parsing things like conditional compilation (which fusebytes is full of), and it doesn’t always put the #include in the appropriate place compared to your personal #include files that may want to use the definitions that are there (you used to be able to add “#include <WProgram.h>”, but that’s no longer version independent.)

You can give the IDE a “hint” by putting a line that it is guaranteed to recognize as a line of C code at a point before it otherwise would have added the #include. For example, fusebytes.cpp now has:

char Arduino_preprocess_edge;  // hint to Arduino pre-processor

#include <avr/boot.h>
#include <EEPROM.h>
#include "cpuname.h"

at the very beginning of the sketch because otherwise it decides to put the #include inside the first “#if 0” code, where it doesn’t do any good.
The extra variable may or may not get optimized out in the binary; in most cases it won’t matter.

thanks, i will test it today.

other question, your Arduino ide https://github.com/WestfW/Arduino is it an updated version ? is there the windows version also ?

https://github.com/WestfW/Arduino is a fork from the Arduino branch that contains ONLY the optiboot bootloader fixes. It's sitting on the "pull queue": https://github.com/arduino/Arduino/pull/30

WestFW's work on the bootloader seems good and stable. So far, though, I've been including in the Arduino software distribution only those versions of the bootloader that we're actually shipping on production hardware. Gianluca has been understandably reluctant to update the production bootloader, because we don't want to run into some intermittent problem that would force us to replace a bunch of boards. I'm hoping we can do more testing, ensure that the new optiboot is totally stable and reliable, and then update to it soon. At that point, I'll include the changes in the Arduino repository and distribution.

On the other hand, we could instead include a "stable" bootloader in the distribution even if it's not yet the version that comes on production boards. That would get changes out to the community earlier (allowing more people to test them) but would mean that your board would behave slightly differently if you ref lashed the bootloader from the IDE. Any thoughts?

Put the stable version in the distribution. The only time I replace the boot loader is when there is a problem.

I bought a number of Uno boards with the problem and it would have been nice to fix them with the IDE. These boards were a huge pain since I booted them a lot using them mostly for software development.

I was thankful for westfw's fixes. It would be nice if the Arduino team had something like a "hot fix" area for bugs like this.

fat16lib: Put the stable version in the distribution. The only time I replace the boot loader is when there is a problem.

I bought a number of Uno boards with the problem and it would have been nice to fix them with the IDE. These boards were a huge pain since I booted them a lot using them mostly for software development.

I was thankful for westfw's fixes. It would be nice if the Arduino team had something like a "hot fix" area for bugs like this.

+1

what is the latest version of optiboot and where can I find it?

I found this http://code.google.com/p/optiboot/downloads/detail?name=Optiboot_v3.zip&can=2&q= but I'm dubious because the dates are from early 2010.

update:I'm using the one from the beta thread and it seems fine. I'm really grateful for the work because I needed the flash space but the question remains: how do you find the latest optiboot (and know it's the latest)?

how do you find the latest optiboot (and know it's the latest)?

The model being followed is that I modify optiboot in a branch "cloned" from the Arduino source branch. It is my intent that every change made should have a matching "Issue" at http://code.google.com/p/arduino/issues/list When I'm happy with it, I submit the changes to that branch ( https://github.com/WestfW/Arduino ), and they theoretically become available for anyone to get a copy. Alas, this is currently a branch based on the non 1.0 Arduino branch.

After some time, when the collection of changes gets "large and interesting", or when some new major release is coming up, I send a message and/or "pull request" to the Arduino team saying "you should take the changes I've made back into the official release."

Then the Arduino team looks at my code and does more extensive testing than I'm able to do, and decides (hopefully) "yes, this is good and it should go into the official distribution." Then it shows up in the official arduino source base as well. (I believe that this has JUST happened for optiboot 4.4 and the 1.0 source base.)

As a separate issue, at some point the Arduino team has to produce binaries of the bootloader and tell their manufacturer "start putting this on the m328 chips that go on Arduinos." This is a relatively Big Deal, since if there's a mistake that isn't noticed till after that, you're now talking about a large base of potentially affected customers who aren't equipped to fix it themselves, and will start returning their Arduinos (very expensive) and complaining all over the internet (ditto.)

This is subject to change (for example, the stk500v2 bootloader used on the Mega has a separate GitHub project), and should be less of an issue going forward, since the changes should be smaller and more easily managed.

So: the latest official version is whatever appears in the latest official release. The latest "beta" version is whatever appears on the Arduino github repositories. For later than that, you have to watch the forums and/or the google code issue list, and/or ask.

So: the latest official version is whatever appears in the latest official release. The latest "beta" version is whatever appears on the Arduino github repositories. For later than that, you have to watch the forums and/or the google code issue list, and/or ask.

Thanks. is one of those the v3 on google code? http://code.google.com/p/optiboot/downloads/detail?name=Optiboot_v3.zip&can=2&q=

is one of those the v3 on google code? http://code.google.com/p/optiboot/

No, that's pretty much the "old" optiboot that shipped with original Unos and 0022. It seems to have been abandoned; I don't think anyone has heard from Peter Knight (the original author) in quite a while :-(