Pages: 1 [2] 3 4 ... 23   Go Down
Author Topic: New optiboot; beta testers welcome...  (Read 72795 times)
0 Members and 4 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 16568
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12293
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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

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

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12293
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Look for WestfW's Optifix sketch

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

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I read the Optiboot version?
Logged

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

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

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

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.

Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3540
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

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

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.)
« Last Edit: July 05, 2011, 09:19:55 pm by westfw » Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3540
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Aha, thanks.  I may play with it a bit.  Again, nice work!
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21669
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
« Last Edit: July 26, 2011, 05:07:56 pm by leo72 » Logged


Pages: 1 [2] 3 4 ... 23   Go Up
Jump to: