Go Down

Topic: Arduino Leonardo sketch size > 12kBytes too big (Read 1 time) previous topic - next topic

robin_de

Jan 22, 2013, 09:50 am Last Edit: Jan 22, 2013, 10:15 am by robin_de Reason: 1
Hi!
I have a problem with my Arduino Leonardo. If i want to upload a sketch
which is bigger than 12kBytes the RX led is always on and Windows says
"USB device isn't recognized". When the sketch size is under 12kBytes, e.g. 11,5 kBytes
the Arduino works very well without problems. The special Reset function (" hold the reset button while uploading ")
doesn't work and the Arduino Software doesn't report any errors or warnings!

Is there anyone who has the same problem or can help me to deal with it?

I'm using Windows 7 64bit and the Arduino Software Version 1.0.3
The Maximum sketch size of the Leonardo is 28672 Bytes


Thanks in advance ...



Coding Badly


How much SRAM does your > 12 KiB program use?


Coding Badly


http://playground.arduino.cc/Code/AvailableMemory
http://jeelabs.org/2011/05/22/atmega-memory-use/
http://www.faludi.com/examples/helpful-arduino-functions/

https://www.google.com/search?q=arduino+free+ram

robin_de

Thank you for the Links!

I minimized my program code to a program size where my arduino works without problems and included the MemoryFree.h from your first Link.
On the Serial Monitor was written " freeMemory = 182". So i think that my RAM of the Arduino only had 182 Bytes free.
Is that enough RAM or can this small amount of free RAM leads to problems like i have mentioned in my first post ?


Coding Badly


You are welcome.

Is that enough RAM?


Maybe.  You have to determine the free space from the deepest stack depth (which can be extremely difficult).

Quote
Or can this small amount of free RAM leads to problems like i have mentioned in my first post ?


It can.

robin_de

Thank you for your support!

I will try to save some strings in the flash or eeprom memory!

If this not help i'll buy the Arduino Due because the SRAM of this Arduino Board will be big enough for my
application.


Go Up