Go Down

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


Jan 22, 2013, 09:50 am Last Edit: Jan 22, 2013, 10:15 am by robin_de Reason: 1
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




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).

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

It can.


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

Go Up