Go Down

Topic: Quirks, anomalies and problems with Arduino IDE 1.0 - long (Read 1 time) previous topic - next topic

BillO

May 08, 2012, 05:29 pm Last Edit: May 08, 2012, 05:31 pm by BillO Reason: 1
Okay, a little explanation of what has transpired, then a question.

So I finally moved everything over to the Arduino IDE 1.0.


Quirk #1.  Recently I tried to program an Arduino Mini only to find that 1.0 will not program older Minis as Minis anymore.   Not to worry, I got past it by calling my Mini a Duemilanove and it worked just fine.  After some investigation, I find that the Arduino team are now requiring a different booltloader in the Mini.  Supposedly optiboot_mega328-Mini.hex.


Problem #1.  So, I decided I'd try out this fascinating new bootloader.  I got another Mini and a Adafruit USBtinyISP programmer and tried to burn the bootloader on.  Only to get this error after about 2 minutes:
Code: [Select]
avrdude: verification error, first mismatch at byte 0x7e81
        0x93 != 0xe0
avrdude: verification error; content mismatch

This happens repeatedly and with different Minis, Arduino, mine, no-name Chinese, etc... (all 328 @ 16mHz)


Problem #2.  Undaunted, I go to a machine with a serial port and take out my trusty OMS AVR Prog-S.  It always works.  Well, not this time.  After about 2 minutes I get the following error:
Code: [Select]
avrdude: verification error, first mismatch at byte 0x7e81
        0x93 != 0xe0
avrdude: verification error; content mismatch

Well, what do you know?  Same problem, same place.  And yes, this happens repeatedly and with different Minis.


Shaking my head, I invoke my 0022 install and try that.  No issues.  I can burn bootloaders of any imaginable kind till the cows come home.  No problemo!

Feeling a little exasperated, I again invoke the 1.0 install and try a Duemilanove with the ArduinISP sketch on it.  And it works (but by no means each and every time)!  Well, we're moving ahead ... right?  You'd think so, but...


Quirk #2.  Now that I have an Arduino Mini with the intended bootloader on it I go back and try my initial task (Yeah, this was supposed to take 5 minutes, now several hours later...) and I try to upload that initial sketch.  No go.  After about 15 seconds I get the beloved sync error:
Code: [Select]
avrdude: stk500_getsync(): not in sync: resp=0x00
I try several times with the same result (Duh?).  Then, blood trickling down my forehead from beating it repeatedly on the wall, in desperation I try selecting board type UNO, and guess what, it works!  WTF!!  I carefully try all this again.  Set the IDE to Board="Arduin Mini w/ATmega328", Programmer="Arduino as ISP", Port="COM 7" (where the Duemilanove is...), burn the bootloader fresh, try to upload the sketch and after about 15 seconds get the sync error.  Then set Board="Uno" and it works.  This can't be right.


Anomaly #1 in doing all this I notice the following.  When I compile the sketch using "Arduin Mini w/ATmega328" as the target the IDE reports:
Code: [Select]
Binary sketch size: 1218 bytes (of a 28672 byte maximum)Whereas, if I compile the sketch with UNO as the target the IDE reports:
Code: [Select]
Binary sketch size: 1218 bytes (of a 32256 byte maximum)If indeed the new bootloader for the Arduino Mini is optiboot based, should it not have more than 28672 bytes available?  That is about 2K less than what the old booloader left.  This has to be an issue.


In summing up:
Arduino IDE 1.0 (or their version of avrdude 5.5) no longer works with USBtinyISP
Arduino IDE 1.0 (or their version of avrdude 5.5)  no longer works with programmers using serbb
The new Mini bootloader and/or the Arduino IDE 1.0 are messed up and/or do not work with each other.

Now my question.  How do I get someone on the Arduino team to have a look into all this?

Facts just don't care if you ignore them.

perhof

In boards.txt try changing the line
mini328.upload.protocol=stk500
to
mini328.upload.protocol=arduino

And as you say, the max size seems wrong for an optiboot bootloader.

If the optiboot bootloader has the same size for the mini which I assume the Mini should have the same max upload size as UNO and the same boot size fuse settings as the Uno. The difference would then be the bootloader.file and the build.variant
You could try replacing the mini328 section in boards.txt with this:

Code: [Select]
mini328.name=Arduino Mini w/ ATmega328

mini328.upload.protocol=arduino
mini328.upload.maximum_size=32256
mini328.upload.speed=115200

mini328.bootloader.low_fuses=0xff
mini328.bootloader.high_fuses=0xde
mini328.bootloader.extended_fuses=0x05
mini328.bootloader.path=optiboot
mini328.bootloader.file=optiboot_atmega328-Mini.hex
mini328.bootloader.unlock_bits=0x3F
mini328.bootloader.lock_bits=0x0F

mini328.build.mcu=atmega328p
mini328.build.f_cpu=16000000L
mini328.build.core=arduino
mini328.build.variant=eightanaloginputs

BillO

#2
May 08, 2012, 09:46 pm Last Edit: May 08, 2012, 10:07 pm by BillO Reason: 1
Hi Perhof,

Thanks for the suggestions, I do appreciate it.  It's not that I can't fix these problems for myself, or just simply work around those that I can't fix, it's that these need to be addressed for everyone.  There are a lot of folks out there that are new to microcontrollers and to Arduino that are not yet skilled enough to dig into the inner workings and provide their own fixes.

I sent a PM to Mr.'s Banzi, Mellis and Cuartielles.  Maybe they will try to help fix these for some future release.
Facts just don't care if you ignore them.

perhof

#3
May 08, 2012, 09:54 pm Last Edit: May 08, 2012, 09:56 pm by perhof Reason: 1
I know what you mean but I'm not sure they read the forums much.
There is another forum called Suggestions for the Arduino Project (http://arduino.cc/forum/index.php/board,21.0.html) which I think is supposed to be used for reporting bugs but I'm not impressed by it. I've seen bugs reports not getting any attention before.
Let's hope email works better.

BillO

#4
May 12, 2012, 04:52 pm Last Edit: May 12, 2012, 04:55 pm by BillO Reason: 1
So, I should maybe take away from the overwhelming response that no one gives a hoot?

Could I ask for a moderator to move this to the "Suggestions for the Arduino Project" forum?  I think it would be better ignored there.
Facts just don't care if you ignore them.

Go Up