CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Out of rom!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
TheGaut
Guest







Out of rom!
PostPosted: Mon Mar 08, 2004 2:34 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Mon Mar 08, 2004 2:43 pm     Reply with quote

one of your functions is too large. Try splitting it up.
TheGaut
Guest







hmmm
PostPosted: Mon Mar 08, 2004 3:09 pm     Reply with quote

The function is not really big.
Kasper



Joined: 14 Jan 2004
Posts: 88
Location: Aurora, Ontario, Canada

View user's profile Send private message Visit poster's website

PostPosted: Mon Mar 08, 2004 3:46 pm     Reply with quote

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
PostPosted: Mon Mar 08, 2004 3:55 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon Mar 08, 2004 6:38 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Mar 09, 2004 3:24 am     Reply with quote

Look up #separate and #inline in the CCS manual
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 09, 2004 8:53 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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