|
|
View previous topic :: View next topic |
Author |
Message |
Miniman
Joined: 30 Apr 2007 Posts: 44
|
Out of RAM error, strange? |
Posted: Fri May 09, 2008 3:07 pm |
|
|
Hi
I am writing a program using usb_cdc and my home made FAT32 code, but I'm running out of ram.. I can compile the program at one stage and it tells me that I use 85% of the ram, but if I declare and use a single byte more I get the "Not enough RAM for all variables" error. I think this is strange, there should be 15% ram left, shouldn't it? Or doesn't the compiler count with the memory defined in #reserve?
The compiler version: 4.038
Any help would be thankful.
BW Miniman |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri May 09, 2008 4:16 pm |
|
|
The program memory is made up of 'pages'. Each page can only hold up to so much information. Even though the 'total' usage is only 85% the page, that holds the section of code you are working on, might be 99% full. When you make that last declaration it could be over-filling that page.
If there is anything you can move out of that area, (made into a separate function), then there might be enough room for you to add other things needed in there.
Ronald |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|