Question about frustrating memory overrun

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
lucgallant
 
Posts: 39
Joined: Sat Mar 15, 2014 12:21 pm

Question about frustrating memory overrun

Post by lucgallant »

Hi there,

I'm working on the Uno and I have a sketch that's about 26k in size. Recently I started having issues where my Serial.println statements just weren't coming out. Also, sometimes nothing would print to me LCD. This was extremely frustrating.

So, I googled extensively and found the F() function. It's described here somewhat: http://www.baldengineer.com/blog/2013/1 ... o-f-macro/

What I want to know is, is there a way of the IDE or some internal variables letting you know that your RAM is at capacity?

I guess my issue is that I had so much text getting complied into RAM. I put F() around all the text inside both the Serial.println and lcd.print, and it runs great now. I have further optimization to do, but I spent a lot of time dealing with this issue.

I guess if someone could direct me to a resource where I could learn more about this, and maybe prevent someone else from having this frustrating issue. It's difficult to debug with no println and no real debugger... Thanks guys.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Question about frustrating memory overrun

Post by adafruit_support_mike »

This tutorial has information about monitoring memory usage:

https://learn.adafruit.com/memories-of- ... ree-memory

lucgallant
 
Posts: 39
Joined: Sat Mar 15, 2014 12:21 pm

Re: Question about frustrating memory overrun

Post by lucgallant »

Lol, perfect, this describes my situation well.

https://learn.adafruit.com/memories-of- ... ot-dot-dot

"My program worked fine until..."

This is what I needed, thanks.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”