View previous topic :: View next topic |
Author |
Message |
TheGaut Guest
|
Out of rom! |
Posted: Mon Mar 08, 2004 2:34 pm |
|
|
When i compile i get this error:
out of ROM, A segment or the program is too large.
main
Seg 0800-0FFF,0748 left,need 07FE
...
...
...
...
...
...
Help me please!!!
Thank you! |
|
|
Kasper
Joined: 14 Jan 2004 Posts: 88 Location: Aurora, Ontario, Canada
|
|
Posted: Mon Mar 08, 2004 2:43 pm |
|
|
one of your functions is too large. Try splitting it up. |
|
|
TheGaut Guest
|
hmmm |
Posted: Mon Mar 08, 2004 3:09 pm |
|
|
The function is not really big. |
|
|
Kasper
Joined: 14 Jan 2004 Posts: 88 Location: Aurora, Ontario, Canada
|
|
Posted: Mon Mar 08, 2004 3:46 pm |
|
|
post the code so we can see if we can see anything then. Hard to tell without seeing it.
Also post your compiler version just in case. |
|
|
Ttelmah Guest
|
Re: hmmm |
Posted: Mon Mar 08, 2004 3:55 pm |
|
|
TheGaut wrote: | The function is not really big. |
You may be suprised.
You can (for instance), write hugely long functions that result in quite small code (lots of simple input/output instructions), or conversely, write a 'one liner', that uses a huge amount of code space.
Printf statements are bulky, as are floating point arithmetic.
Best Wishes |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Mon Mar 08, 2004 6:38 pm |
|
|
The compiler likes to in-line function calls and that can make for lots of ROM use. Generally if the called function is only used in that one place then it will get in-line'd
I think there is a # directive that can be used to prevent automatic in-lining of code. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
mpfj
Joined: 09 Sep 2003 Posts: 95 Location: UK
|
|
Posted: Tue Mar 09, 2004 3:24 am |
|
|
Look up #separate and #inline in the CCS manual |
|
|
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Tue Mar 09, 2004 8:53 am |
|
|
rwyoung wrote: | The compiler likes to in-line function calls and that can make for lots of ROM use. Generally if the called function is only used in that one place then it will get in-line'd
I think there is a # directive that can be used to prevent automatic in-lining of code. |
If you call a function once the compiler will inline it. But if you call a function once and you're running out of space in that page then it will realize this and make it separate automatically. |
|
|
|