Pages: [1]   Go Down
Author Topic: Quirks, anomalies and problems with Arduino IDE 1.0 - long  (Read 1683 times)
0 Members and 1 Guest are viewing this topic.
Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 597
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: May 08, 2012, 10:31:56 am by BillO » Logged

Facts just don't care if you ignore them.

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 597
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 08, 2012, 03:07:35 pm by BillO » Logged

Facts just don't care if you ignore them.

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 262
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 08, 2012, 02:56:37 pm by perhof » Logged

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 597
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 12, 2012, 09:55:05 am by BillO » Logged

Facts just don't care if you ignore them.

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5846
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

People give a hoot. I don't have that model Arduino to test with. And I use Linux. I report errors and bugs here:
http://code.google.com/p/arduino/

I have found it takes a while to get bugs patched, but all 3 of the bugs and the Arduino Reference page errors that I have reported have been fixed. However, I also submitted the patches to the code with the reports. I think that speeds up things a bit.
http://code.google.com/p/arduino/issues/detail?id=604
http://code.google.com/p/arduino/issues/detail?id=605
http://code.google.com/p/arduino/issues/detail?id=795
http://code.google.com/p/arduino/issues/detail?id=880
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Moved as requested.

I'm investigating bootloaders right now, and there is quite a bit of complexity to the whole process.

Thanks for your reported fixes. I personally find that the 1.0 version of the IDE is a little quirky. Thankfully you can keep a copy of both versions with no major problems.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5846
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Nick. I guess you know my opinion differs on the versions. I am on IDE v1.0.1-rc2 now. It is working really well for my sketches. Of course, they are mostly ethernet shield related. I have most of the bugs out of that library already, and I am running the w5200 version of Wiznet's code on a w5100 with no problems.

I have always liked the view as the lead dog.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Upgrade: Exchange your old bugs for new ones. smiley-wink
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have always liked the view as the lead dog.

That's how I drive.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5846
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I drive that way too!  smiley-grin

I am on IDE v1.0.1-rc2. I exchanged "bugs" for "no bugs". When I find a bug there, you can bet you will hear about it, don't you think?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Absolutely.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5846
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW, it is not just bugs that I report. The Wiznet w5200 code I modified for the Arduino ethernet library has been reported to the Arduino crew as an enhancement. The code is there if you are willing to try it.
http://code.google.com/p/arduino/issues/detail?id=898

You must have IDE v1.0.1 to use it. You must replace four files. The last two files have function calls that v1.0 doesn't support.
w5100.h
w5100.cpp
Ethernet.h
Ethernet.cpp

add: The point is that people here DO give a hoot. When you say they don't, that is showing only that you are not paying attention.
« Last Edit: May 13, 2012, 08:47:10 am by SurferTim » Logged

Pages: [1]   Go Up
Jump to: