Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: Has anyone EVER uploaded more than 30k sketch to a Mega 2560 or ADK? on: January 28, 2013, 11:28:48 pm
Quote
Also: what OS are you using?

At work I am using Windows 8 64 bit and at home I'm using OSX 10.8.2

For the IDE, it's Arduino 1.0.3.  I'll bring this board to work tomorrow and try Nick's code there.

Thanks again for the help!

Nick - I didn't "start" with trying to upload new bootloaders...that was a move of desperation due to several other forum posts I read in my voyages that a faulty bootloader may be the problem.  Trust me, I am more than happy to not mess with that.  As for the programmer, my thought process was that since it bypassed the boot loader, and since the bootloader may be the culprit...that I might be able to upload a larger sketch by bypassing the "potentially" faulty bootloader.  

Thanks for the tip on the String class - it sucks to have to do a lot of that work with char * though...guess I'll dust off my "C++ in a nutshell" book :-)
2  Using Arduino / Installation & Troubleshooting / Re: Has anyone EVER uploaded more than 30k sketch to a Mega 2560 or ADK? on: January 28, 2013, 10:37:35 pm
Hi westfw...thank you for the in-depth response.

Nick, I didn't mean to offend...just very frustrated.  I apologize if I did not understand your first post to mean that "many" people had succeeded.  I wasn't getting anyone else saying that they could so I figured you were either lucky or using an AVR programmer (instead of the USB cable).

I will post my code first thing in the morning when I return to work.  It's mostly cobbled-together bits of the Arduino examples (temperature readings from the temperature sample, COSM generated code from their website, and some NTP time-sync stuff from another example).  No secrets or mystery...but I will definitely post in the AM when I can get to my machine.  The storm in the northeast is preventing me from remoting into my machine to grab the offending code.

In the meantime, I did try Nick's referenced code and that did work.  I have no idea why that will and a sketch containing nothing but String declarations will not (when > 30k).

I did the boot loader query and got the following:  Although I'm not sure what to make of it :-)

Arduino explorer stk500V2 by MLS
Bootloader>? CPU stats
Arduino explorer stk500V2 by MLS
Compiled on  = Sep  9 2010
CPU Type     = ATmega2560
__AVR_ARCH__ = 6
GCC Version  = 4.3.3
AVR LibC Ver = 1.6.7
CPU signature= 1E9801
Low fuse     = FF
High fuse    = D0
Ext fuse     = FD
Lock fuse    = CF
Bootloader>
3  Using Arduino / Installation & Troubleshooting / Re: I Cant install arduino mega on: January 28, 2013, 06:33:40 pm
Not sure if you're using Windows or not, but check out this post if you are: http://arduino.cc/forum/index.php?topic=94651.15
4  Using Arduino / Installation & Troubleshooting / Re: Has anyone EVER uploaded more than 30k sketch to a Mega 2560 or ADK? on: January 28, 2013, 06:30:11 pm
Still no resolution.

New Bootloader: OK, today I tried out the tutorial on using an UNO to program my mega ADK...I followed the wiring diagram on the Arduino site using pins 10, 11, 12 and 13 as opposed to the one on Adafruit and elsewhere that use the ICSP pins.

I downloaded the ROBOTC bootloader hex for the mega/ADK and gave that a try (after placing it in the appropriate /hardware/arduino/bootloaders folder).

But all I get is the infamous AVRDUDE: Yikes invalid device signature message.  

Trying to prove the 30k limit:
In order to rule out anything in my code, I tried a very simple sketch which consisted of nothing in the setup or loop function and contained ONLY String (capital S) declarations at the global level.
I grabbed a book from the Gutenberg project and threw it into those String declarations.

I could upload the sketch as long as it was under 30k...add one more String declaration and whammy - it failed.  So this clearly ruled out anything I had in my actual code.

Trying to rule out the ADK (as opposed to the regular Mega):
Frustrated, I went to Radio Shack and bought a regular Mega (not an ADK).  Guess what?  Same exact issue - nothing greater than 30k will upload to it.

My last ditch option is that I ordered an actual Atmel AVR ISP programmer.  Will update after I get that tomorrow.
5  Using Arduino / Installation & Troubleshooting / Re: Has anyone EVER uploaded more than 30k sketch to a Mega 2560 or ADK? on: January 27, 2013, 07:02:30 pm
I have my IDE set to the Arduino ADK and I have the appropriate port set.

It's important to understand...I CAN upload successfully - as long as my sketch is below 30k.

So:
1. I upload a sketch that is just under 30k - success!
2. I add one harmless line of code...say, declare an int, or do a Serial.println...anything that will increase sketch size.
3. Try to upload - FAILURE
4. comment out any line to reduce sketch size again below 30k size - SUCCESS.

This is purely a size issue - I've tried it on both Windows and MAC machines with two different ADK boards...

All 4 combinations of ADK board and laptop are the same - success with small sketches, failure the moment they go over ~30k.
6  Using Arduino / Installation & Troubleshooting / Re: Any Idea why Arduino ADK has upload limit of 30k vs. 256k on: January 27, 2013, 12:30:07 pm
I don't have any triple exclamation points in my code.  It is very straightforward Ethernet, NTP and Sensor based stuff.

I guess my main question is...has anyone EVER been able to upload more than 30k to a Mega 2560 or ADK directly from the factory?

Or have they had to buy a separate programmer and load up a new boot loader?  Seems like I either got an old production board (I have no idea how to tell date-of-manufacture) with an outdated/flawed boot loader, or they just have never actually shipped a board with the ability to use the 256k.
7  Using Arduino / Installation & Troubleshooting / Re: Arduino ADK upload limit of 30k vs. 256k on: January 26, 2013, 12:53:55 am
OK...this is what I get over and over again...a timeout error and the letters "Bootloader Huh?"

I should also add this the exact same thing happens on my work machine - windows 8 64 bit and on my home machine - MacBook Pro.

Finally, I am using different ADK units at work vs. home...so both ADKs exhibit the same behavior on two different dev environments.

Of course, I purchased both ADKs at once from CanaKit (through Amazon).

avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: Send: . [1b] . [85] . [00] . [08] . [0e] . [1d] . [04] . [04] . [00] @ [40] . [00] . [00] . [0e] . [cb]
avrdude: Recv: H [48]
avrdude: Recv: u [75]
avrdude: Recv: h [68]
avrdude: Recv: ? [3f]
avrdude: Recv: . [0d]
avrdude: Recv: . [0a]
avrdude: Recv: B [42]
avrdude: Recv: o [6f]
avrdude: Recv: o [6f]
avrdude: Recv: t [74]
avrdude: Recv: l [6c]
avrdude: Recv: o [6f]
avrdude: Recv: a [61]
avrdude: Recv: d [64]
avrdude: Recv: e [65]
avrdude: Recv: r [72]
avrdude: Recv: > [3e]
avrdude: Recv: H [48]
avrdude: Recv: u [75]
avrdude: Recv: h [68]
avrdude: Recv: ? [3f]
8  Using Arduino / Installation & Troubleshooting / Re: Arduino ADK upload limit of 30k vs. 256k on: January 25, 2013, 09:44:33 pm
Yes, I am using the boot loader...and I wasn't aware of the options for verbosity.  I'll give that a try as soon as my boys go to sleep.

Thanks for helping out!
9  Using Arduino / Installation & Troubleshooting / Re: Arduino ADK upload limit of 30k vs. 256k on: January 25, 2013, 09:31:55 pm
Well, I appreciate the offer of reducing the size...but that misses the root problem.  30 vs 256 is a huge difference.  I honestly feel like there are lots of reasons I need more than 30k.

The reason it's large for this project is because I'm syncing the time with an NTP server, I'm making web service calls out of the device and I'm running a web server on it for IP based configuration...in addition to normal sensor readings and firing off some relays as alarm inputs to an access control system.

I also have redundant units that will be communicating with each other to act as active-active failovers...but I can't start working on the peer-to-peer communications with me already being at the erroneous 30k limit.

I do thank you for the spirit of the offer to help reduce size!  I just really need closer to 50k...which I figured would be no problem with the 256k ADK unit.
10  Using Arduino / Installation & Troubleshooting / Has anyone EVER uploaded more than 30k sketch to a Mega 2560 or ADK? on: January 25, 2013, 08:59:35 pm
Hi,

I'm new to the arduino, but not to programming.  I started with an UNO on Monday and quickly got close to the 32k limit, so I ordered an ADK.

Problem is, if I exceed 30k on the ADK, the sketch fails to complete uploading.  Comment out one line of code to reduce the sketch size (any line, not a specific one), and it works.

The whole reason I "upgraded" was to have the extra space.  I read some really confusing posts about an incorrect hex file being released May 9th with a new file released on the 11th but not packaged or deployed on new product.  I don't have the serial cable, just a USB connection, so the bits I was able to understand seemed impossible for me to do anyway.

Does anyone have any relatively simple fixes for this?
Pages: [1]