Beating memory limitations

Share you PDE file with our community
Post Reply
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Beating memory limitations

Post by psyrob »

FWIW:
I was having a heck of a time getting my old PDE file to fit in an INO file using Aurdino...I kept getting "sketch too big", and it was not even close, like 1000kb over the limit :( ...I was resigning myself to having a more stripped down file with a screen I didn't like and fewer functions or thinking I would have to upgrade to a RA+ (which is not a bad idea regardless ;) )....

However...I downloaded NotePad++, and messed with my files there...I opened my stripped down INO file, and opened my old PDE both in NotePad++, merged them the way I wanted to, then opened Aurdino and pasted the file from NotePad++ into Aurdino...much to my surprise, when I Verify'ed it, I was under the memory limits!!! and with 600kb to spare!!! :P Just doing it this way, I went from being over 1000kb over the limit to 600 kb under the limit, and I have my full old PDE file, the screen I like and functionality I had before...

I don't know if this is really due to generating the file this way, or maybe I was doing something wrong, but this is what I did and it worked to lick the memory limitation issue I was having...Thought I would share my experience in the hope it would help others... :mrgreen:
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Beating memory limitations

Post by rimai »

Thanks for sharing.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Beating memory limitations

Post by binder »

One thing to make sure you do too is keep Arduino closed whenever you make changes to the Features file.

Arduino LOVES to keep the files "precompiled" and "cached", to improve the compiles but can be annoying because not all of the code gets stripped out. Say you have the Wavemaker function included. You compile and test. You see it's at a certain code size. You decide to remove the Wavemaker function then recompile. You notice that the code size only decreased a little (if any). You close Arduino and reopen it then recompile. You notice that the code size shrinks a lot more.

This sort of stuff can happen.
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Beating memory limitations

Post by TanksNStuff »

I think this has more to do with what Curt is speaking of than copy/pasting from Notepad++ (unless you converted it somehow before pasting back to Arduino.) I opened my INO file in Notepad++, copied it over to a new Arduino (opened just before copying) and verified it in Arduino. File size was exactly the same size before and after... 31966 bytes.

Mine is still small enough to run as is, but I was hoping to put some more bells and whistles in there.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Beating memory limitations

Post by psyrob »

Yes, I think what using notepad++ did for me was force me to keep Arduino closed and avoid the pre compiling stuff Curt was talking about. Before, I would open two Arduino's simulateously and have the old and new PDE/INOs in each of the windows, cutting and pasting back and forth...
Image
TanksNStuff
Posts: 188
Joined: Fri Dec 30, 2011 6:57 am

Re: Beating memory limitations

Post by TanksNStuff »

Yea, in that case, using notepad++ would avoid having the two arduino files in memory with Arduino, and avoiding erroneous memory usage.
Post Reply