Offline
Newbie
Karma: 0
Posts: 30
|
 |
« Reply #15 on: June 28, 2011, 01:19:14 am » |
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)
Online
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #16 on: June 28, 2011, 03:36:20 am » |
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
Online
Shannon Member
Karma: 120
Posts: 10179
|
 |
« Reply #17 on: June 28, 2011, 03:53:23 am » |
@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
Newbie
Karma: 0
Posts: 30
|
 |
« Reply #18 on: June 28, 2011, 09:03:19 am » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Sr. Member
Karma: 5
Posts: 367
|
 |
« Reply #19 on: June 28, 2011, 11:29:52 am » |
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
Online
Shannon Member
Karma: 120
Posts: 10179
|
 |
« Reply #20 on: June 28, 2011, 12:34:58 pm » |
Look for WestfW's Optifix sketch Does Optifix update the processor on which it is running or does it update other processors?
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Sr. Member
Karma: 5
Posts: 367
|
 |
« Reply #21 on: June 28, 2011, 02:58:06 pm » |
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)
Online
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #22 on: June 28, 2011, 07:17:09 pm » |
I'm traveling at the moment, but I'll try to post an updated (with optiboot 4.4) optifix soon...
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Arduino rocks
|
 |
« Reply #23 on: June 30, 2011, 10:54:50 am » |
How do I read the Optiboot version?
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Online
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #24 on: July 02, 2011, 03:39:29 am » |
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)
Online
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #25 on: July 05, 2011, 06:24:49 pm » |
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
Faraday Member
Karma: 43
Posts: 2518
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #26 on: July 05, 2011, 07:53:25 pm » |
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 #define USEFLASHLIB 1 to get it to compile, and (2) It reports 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
|
|
|
|
|
SF Bay Area (USA)
Online
Faraday Member
Karma: 78
Posts: 5454
Strongly opinionated, but not official!
|
 |
« Reply #27 on: July 05, 2011, 08:02:11 pm » |
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
Faraday Member
Karma: 43
Posts: 2518
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #28 on: July 05, 2011, 09:09:55 pm » |
Aha, thanks. I may play with it a bit. Again, nice work!
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16506
Don't know what I do
|
 |
« Reply #29 on: July 26, 2011, 05:00:26 pm » |
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
|
|
|
|
|
|