Go Down

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

As the Uno (with default Optiboot) seems to have trouble flashing through ArduinoISP because of autoreset problems, could I slice the PCB trace that enables autoreset and then flash using it?

retrolefty

Quote
could I slice the PCB trace that enables autoreset and then flash using it?


Yes, that would defeat the board's auto-reset function. However you would have to re=enable the trace path for when you want to do future uploads of other sketches onto the board, or learn how to time manual resets at the proper time to allow uploads to work.

Lefty

Coding Badly


@montymintypie: If you install the latest version of Optiboot provided by @westfw you should not need to do anything special (like cutting the RESET trace) for the Arduino ISP Sketch to work.


If you install the latest version of Optiboot provided by @westfw you should not need to do anything special (like cutting the RESET trace) for the Arduino ISP Sketch to work.

However you would have to re=enable the trace path for when you want to do future uploads of other sketches onto the board, or learn how to time manual resets at the proper time to allow uploads to work.


@Coding Badly, I have no way to update my Uno as of yet, so I plan to purchase an additional 328 for the purpose (also for a standalone project I have), which is why I need to run ArduinoISP on my current Optiboot.

@retrolefty, as the trace is designed to be cut (it's one of those bare pads) I can easily re-solder the joint to enable the functionality again. :)

tim7

You don't need to disable auto-reset in order to upload a new bootloader.  Look for WestfW's Optifix sketch.  You'll need to update the binary data at the end of the sketch, but it's very easy to do.

Coding Badly

Quote
Look for WestfW's Optifix sketch


Does Optifix update the processor on which it is running or does it update other processors?

tim7


Does Optifix update the processor on which it is running or does it update other processors?


AFAIK it's not possible to rewrite the bootloader memory internally.  But if anybody wants to try out the new Optiboot v4.4 and they have two Arduino boards, the Optifix sketch avoids the need to disable auto-reset on the board acting as programmer.  Once one of the boards has Optiboot v4.4 installed it will run ArduinoISP properly (again without fiddling about disabling the reset signals).  Although for this purpose IMHO Optifix is easier to use than ArduinoISP + AVRdude.

I hope WestfW doesn't mind me beating this particular drum.  It's all his work.

westfw

I'm traveling at the moment, but I'll try to post an updated (with optiboot 4.4) optifix soon...

newhobby

How do I read the Optiboot version?

westfw

Quote
How do I read the Optiboot version?

It's in the last two bytes of flash memory.  You can see it in the .HEX file and read it with an ISP programmer (including ArduinoISP.)  To read it from a sketch, you'd need to update the protection fuses as per the source repository...

(The existing optiboot doesn't have a version number.  Not even in the source code.  There was only the version attached to the .ZIP file in the optiboot repository, and/or the version of the Arduino distribution.  Adding the extra version number was one of the enhancements in this new version.)

westfw

I have uploaded an optiLoader4_4.zip sketch to Google Docs.
OptiLoader is a superset of the earlier optifix sketch.  Like optifix, it provides zero or one-button reprogramming of an Uno bootloader with the latest optiboot (4.4 in this case) while bypassing any auto-reset issues.  In addition, it automatically detects chip type and will program an appropriate optiboot into ATmega168 and ATmega8 as well.

Documentation is a bit slim at the moment, but there isn't much too it.  Wire as described in the ArduinoISP documentation, and run the sketch.  It's designed to re-run via the reset button, to easily program multiple Arduino clones.  Run a serial monitor at 19200 if you want to see what it's doing.  If you put optiboot on mega8 or mega168 chips, you'll also need to have an updated boards.txt...

I've also uploaded fusebytes.zip, which pretty-prints assorted "deep" information about your Arduino.  Including the optiboot version number if present and readable.


Jack Christensen


I've also uploaded fusebytes.zip, which pretty-prints assorted "deep" information about your Arduino.  Including the optiboot version number if present and readable.


Sweet!  Couple things, (a) Had to comment out the line
Code: [Select]
#define USEFLASHLIB 1 to get it to compile, and (2) It reports
Quote
Bootloader at 0x7E00 is not readable
even though I've burned the bootloader from earlier in this thread.  Should it find a version number?
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

westfw

#27
Jul 06, 2011, 03:02 am Last Edit: Jul 06, 2011, 04:19 am by westfw Reason: 1
Quote
Bootloader at 0x7E00 is not readable

If you burned the bootloader using the existing boards.txt settings for Uno, it read-protects the bootloader from sketches, making the bootloader version number unreadable.  The code changes to fix this are submitted via source, but are not part of the bootloader itself.  (you COULD change the xxxx.bootloader.lock_bits from 0x0F to 0x2F in boards.txt and reburn the bootloader, but I'm not sure it's worth it.)

Jack Christensen

Aha, thanks.  I may play with it a bit.  Again, nice work!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

leo72

#29
Jul 27, 2011, 12:00 am Last Edit: Jul 27, 2011, 12:07 am by leo72 Reason: 1
Hello. I've found the news right now and then I've tried to use these sketchs but I am having some issues trying toi compile them.

FuseBytes:
I got:
"pgm_read_byte" was not declared in this scope
at line 83

OptiLoader:
I got:
variable or field "read_image" declared void

I use:
Arduino IDE 0022 + Arduino Tiny Cores
OS: Xubuntu 11.04

EDIT:
I didn't download all of your mod-IDE software... only the sketches, so maybe this could be the explanation of the errors... maybe...

Go Up