Optiloader Mega2560 support

I'm encouraging "new platforms" to use 0x2F for the lock bits, which adds the ability for the sketch to read the bootloader area (and, in particular, see the Optiboot Version number.) I'm pretty sure this is pretty safe (but it wasn't safe enough for the Arduino team to change on Uno...)

(This is actually less important now that the version number is also transmitted via the bootloader protocol. But it's still nice, IMO. It permits sketches like "Fusebytes" to report "useful diagnostic information" about the state of someone's Arduino.)

Good idea, I changed the sketch to do that.

Hi Nick,

When i compile your sketch, i´m getting an error with the F function.

example:

Serial.println (F("Entered programming mode OK."));

Can you tell me where is it declared? I can´t find it.
What do you use it for?

IIRC, that was added in the 1.0 Arduino SDK. I assume you're running an older version?

As a work around, change the line to:

Serial.println ("Entered programming mode OK.");

Hi,

I compiled the sketch and burned it into an UNO.

Still without having a MEGA2560 connected to program.

When i connect the Terminal, it only gives me this:

)
mmand.
1.9

ory

%½Õ

a

Any ideas?

LuisSoares:
When i compile your sketch, i´m getting an error with the F function.

I did that to save RAM. The messages you get show why.

It indeed was written for version 1.0 of the IDE. I suggest you install that, if only to compile this sketch. You don't have to use it all the time.

The rather wordy messages in the sketch consume RAM unless you keep the "F" macro.

Alternatively there are ways of introducing the F idea into 0022 of the IDE (it's pretty simple) but I don't recall where the instructions are.

http://arduiniana.org/libraries/flash/

Hi,

I´m going to make the change to the 1.0 version and see what happens.

Anyway i would like to unsderstand why i have that behaviour just by taking the Flash component.
Basically the strings will go to RAM memory instead, the rest should work normally correct?
But in fact it only works well when i comment a big bulk of code, above the setup() funtion...

can you clarify me this?

Thanks

Just guessing here, but it might be that having those in flash keeps things under the RAM requirements, and having them outside of flash pushes it over available RAM.

It makes perfect sense... sometimes my brain just stops working, sorry...

I've tryed to use this sketch with my board used wit the original version of optiloader ( only for atmega 328 )

Same connection but with this versione ( 1,21 and the last ) wit ide 1.0 or 1.0.5 the programmer board seems to be waithing for something (the last version says whaiting for programmer )

Where is the mistake ?

Best regards
Mr Daniele