View Single Post
  #5   Spotlight this post!  
Unread 02-02-2008, 23:22
Chaos in a Can Chaos in a Can is offline
Joel Spadin
FRC #1736 (Robot Casserole)
Team Role: Programmer
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Peoria, IL
Posts: 58
Chaos in a Can is an unknown quantity at this point
Send a message via MSN to Chaos in a Can
Re: MATH_DATA can not fit the section

From what I can tell, it gives this error when you try to allocate too much memory to one section.
I have no idea how much memory one section can use, or even what one section is, but if you stick stuff into rom or use smaller types, you can probably get rid of this error.

You can also try giving the "-mL" argument to C18 to tell it to use more memory.

I don't believe operations of any sort contribute to the problem, as that is all stored in rom.
Changing the two longs to ints would reduce the amount of ram it needed. Even though they are local, they have to go somewhere when other local variables are still in scope.

You can use "rom" like a variable modifier.
Code:
rom static variable;
I'm quite suprised "const" doesn't put stuff in rom, and I would expect that "rom" makes data unchangeable just like "const".
__________________
2006 Xerox Creativity Award
2007 General Motors Industrial Design Award
2008 Judges' Award
2009 Chrysler Team Spirit Award