Bootloader upgrade (optiboot)

Basic / Standard Reef Angel hardware
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Bootloader upgrade (optiboot)

Post by binder »

lukeluke wrote:i changed my board.txt and the type of the board in the Arduino IDE.

I reinstall the PDE and it's WORKS !!!!

Now, how can i use the WDT ? Curt on you latest release the function works right ?
Yes, the WDT is an option inside the latest libraries. Look at the bottom of the ReefAngel_Features.h file to see how you enable/disable it. There is documentation on how to use it.

curt
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Cool. Glad you got that working.
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Bootloader upgrade (optiboot)

Post by binder »

rimai wrote:It could be that your programmer is not wired up properly.
Chrome has made one and he had sucess in burning his bootloader.
The link you sent is the kind of programmer you are looking for, except that one does not support ATMega328P. If the chip was broken, your whole RA would be broken, so I doubt it's the chip.
I use a USBTiny programmer. You can buy it at adafruit or sparkfun:
http://www.adafruit.com/products/46&zen ... 469c4ccacc
http://www.sparkfun.com/products/9825
I have both of these programmers.

The one from adafruit is a kit that you have to solder together. I followed the instructions and soldered it last night. I just tested it under linux and it works like a charm. It appears to be a little slower than I expected but that may have to do with a configuration setting. No worries.

The one from sparkfun only works with windows. It's super easy to work with and operate.

My personal opinion is both work great. If you are a windows user and don't have any soldering skills or want to mess with it, then the one from sparkfun is the cheapest and simplest option that works. If you use a Mac or Linux, then the one from adafruit would be your choice. It's the next cheapest one and it requires soldering skills but works like a charm.

Just my input on the programmers.

curt
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

With the usbtiny from adafruit, I use -B1 to make it faster. Without it, I agree that it is very slow.
The -B1 wasn't needed when I was using XP on x86 machine.
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Bootloader upgrade (optiboot)

Post by binder »

rimai wrote:With the usbtiny from adafruit, I use -B1 to make it faster. Without it, I agree that it is very slow.
The -B1 wasn't needed when I was using XP on x86 machine.
-B1 is MUCH faster. thanks for the tip.

curt
User avatar
Xender
Posts: 105
Joined: Sun Mar 20, 2011 12:38 am
Location: France

Re: Bootloader upgrade (optiboot)

Post by Xender »

Hello can we use that http://www.geocities.jp/arduino_diecimi ... ex_en.html for Optiboot and not buying AVR programmer?
Thanks
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Not exactly according to that link.
We don't have the FTDI chip. We use the FTDI cable.
So, if you really want to go this route, take a look at this article:
http://exmrclean.blogspot.com/2009/05/b ... b-ttl.html
I've never tried it though.
Roberto.
User avatar
Xender
Posts: 105
Joined: Sun Mar 20, 2011 12:38 am
Location: France

Re: Bootloader upgrade (optiboot)

Post by Xender »

Thx rimai,
I'd like to try but in the article he says that the commands lines are for "ATmega644P" and in the other article he talking about "Arduino Diecimila with a ATMEGA186 chip".
I saw in the manual that we have the "ATmega328P".
So the commands lines are different I guess?

What's the baud rate ?
"FT232U USB Cable Synch BitBang" is good for us?
Note the -p option selects a paticular chip so using another chip this value and others related to fuzes will change
What's fuzes values for us? (What does it mean? French sorry)

From http://www.geocities.jp/arduino_diecimi ... #mega8_328
If you want to burn the bootloader onto .....
ATmega328P
Download avrdude.conf (Update: it's included chip-parameter of ATmega328P)

Use these fuse-bits,lock-bit and .hex file as follows. (according to arduino-0013\hardware\board.txt)
hfuse = DA
lfuse = FF
efuse = 05
unlock = 3F
lock = 0F
bootloader .hex file
arduino-0013(or 0014)\hardware\bootloaders\atmega168\ATmegaBOOT_168_atmega328.hex
Hope it can help for other
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

These are the fuses to be used:
lfuses=ff
hfuses=de
efuses=05
unlock=3f
lock=2f
optiboot_ReefAngel.hex file, which can be downloaded from the original post. Make sure this file is placed inside the folder "C:\Program Files\Reef Angel Controller\hardware\arduino\bootloaders\optiboot"

The chip we use is 328p, so use "-p m328p"
Just use the same baud rate they recommended.

In other words, the command you need to execute is:

Code: Select all

avrdude -c ft232u -P ft0 -p m328p -e -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m

Code: Select all

avrdude -c ft232u -P ft0 -p m328p -U flash:w:optiboot_ReefAngel.hex -U lock:w:0x2f:m
Give this a try.
Roberto.
User avatar
Xender
Posts: 105
Joined: Sun Mar 20, 2011 12:38 am
Location: France

Re: Bootloader upgrade (optiboot)

Post by Xender »

Where do you connect USBtiny on the board?
Can we have a picture example please, Witch way?
In the tutorial?

Do we have to change any jumper?

thanks!
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Image
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: Bootloader upgrade (optiboot)

Post by lukeluke »

in this image you can see where attach the cable

http://forum.reefangel.com/viewtopic.php?p=1033#p1033
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Image
Roberto.
User avatar
Xender
Posts: 105
Joined: Sun Mar 20, 2011 12:38 am
Location: France

Re: Bootloader upgrade (optiboot)

Post by Xender »

Thanks.
Those images and this tutorial should be on the web site ;-)
Fresh Water Aquarium 180*60*80
Salt Water Aquarium 60*60*60
Click Here to see the Video of my Fresh Water Aquarium
Image
rufessor
Posts: 291
Joined: Tue Oct 25, 2011 7:39 am

Re: Bootloader upgrade (optiboot)

Post by rufessor »

Hi All-

I am trying to get a lay person high altitude overview of what exactly is being modded through this optiboot...

I am assuming its changing the Audrino base code that runs the chip itself and by reducing the size of that bit of memory we gain more for our use.

Since I am new to Audrino but have some programming experience, I am going to order my controller in a week or so and am wondering if I should ask that this be done.

I.E. I cannot reasonably expect myself to become an Audrino wiz and do not want to end up in a non-standard set up or having to work through lots of revisions and trouble shooting when I will be starting from ground zero with Reef Angel and Audrino. So would you recommend this, are all new controllers just shipped with this mod? Or should I stay away, learn the basics and if I run into issues with memory down the line and at which point I will know MUCH more than I do now, just wait and deal with it then.

What I am trying to avoid is having too many things on the steep part of the learning curve and intersecting multiple points of ignorance (on my part) when programming and being unable to trouble shoot. With the standard set up I can always just re-load the code prior to my "re-bugging" it and be good to do. If this mod gives me more opportunity to fail I am probably better off without at first.
Any suggestions will be followed as I know the people posting here are MUCH more skilled and knowledgeable than I.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

The optiboot comes as the standard bootloader on all boards shipped nowadays. You won't have to worry about this upgrade.
The optiboot is something that is transparent to you as it works in the background and you basically don't need to do anything for it to work.
This thread is mostly for those that bought RA when they were shipped with the original bootloader.
So, for your birds eye view, this optiboot thread just tells you that your RA will come with a little more available memory and faster upload than the ones with the original bootloader. :)
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Bootloader upgrade (optiboot)

Post by lnevo »

HELP. I'm lost... I got my wife's old laptop (used to be running Windows Vista Home Basic (ugh)) which could not see the network at all reinstalled with Ubunto. I've got arduino going and got everything copied over. Code is compiling, but I can't communicate with the controller. The USB serial is being found and I have permissions to the device and I can choose it (not greyed out) in the Arduino IDE. What board/programmer do I need to choose for my box? Is there anything else I'm missing... I'm ready to upload some code!!!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Do you mean you are running linux box?
If so, you need to pick Arduino Uno as board, but you will need a new pde.jar file.
Overwrite the existing one inside the lib folder of your Arduino application folder.
Then you will need a folder update at "Documents\Arduino\update" with two files inside: feature.txt and source.txt
Let me know if this works.
Attachments
update.zip
(1.91 KiB) Downloaded 413 times
pde.zip
(756.7 KiB) Downloaded 380 times
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Bootloader upgrade (optiboot)

Post by lnevo »

Yes running linux where do i get a new pde.jar?

And all my files are in sketchbook/libraries not Documents/Arduino
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Attached to the post :)
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Bootloader upgrade (optiboot)

Post by lnevo »

Ok, I've overwritten /usr/share/arduino/lib/pde.jar with the one attached...

I've also put the update folder with feature.txt and source.txt in ~/Documents/Arduino/update as well as ~/sketchbook/update and ~/sketchbook/libraries/update

Still getting the same error. Also noticed that it is telling me I've only got 32k of memory (it's not takling to the controller so I know it's not bogus..) but my real code, I'm trying to upload is bigger... anyway, I'm testing with a smaller version anyway and still getting the same error. I'm not sure what next...

Binary sketch size: 30,190 bytes (of a 32,256 byte maximum)
avrdude: stk500_recv(): programmer is not responding
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Bootloader upgrade (optiboot)

Post by rimai »

Do you have RA+?
If so, you need to choose Arduino Mega
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Bootloader upgrade (optiboot)

Post by lnevo »

It's working now. Thanks.
tatulea

Re: Bootloader upgrade (optiboot)

Post by tatulea »

lukeluke wrote:oh yeah!!!!!!

I retry on linux and it's works !!!!!
Can you contact me ? (gaby_tatu_08@yahoo .com)
Post Reply