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 CCS Technical Support

Out of ROM, A segment or the program is too large

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



Joined: 28 Oct 2012
Posts: 2

View user's profile Send private message

Out of ROM, A segment or the program is too large
PostPosted: Sun Oct 28, 2012 9:17 am     Reply with quote

Hi, I'm working with the 16f1518 pic and when I'm trying to compile my code and I get this message: "Out of ROM, A segment or the program is too large program3".

Looking the call tree tool I realized that all the code is written in the page 0, and the function program3 use 2179 Bytes of ROM!

I know that reducing the code in the function program3 i can solve the problem but I would like to know if there is anyway to tell the compiler which page it has to use, since the pic I'm using has 7 pages and as I said before the compiler just use the page 0! Thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Sun Oct 28, 2012 10:03 am     Reply with quote

The compiler will automatically use other pages. Problem though is that a whole page is just 2048 bytes, so the function you have won't fit in any page. If you split the code up into smaller pieces, then the compiler will juggle these and fit them into other pages as required.

Best Wishes
cristianclc



Joined: 28 Oct 2012
Posts: 2

View user's profile Send private message

PostPosted: Sun Oct 28, 2012 6:45 pm     Reply with quote

Ttelmah wrote:
The compiler will automatically use other pages. Problem though is that a whole page is just 2048 bytes, so the function you have won't fit in any page. If you split the code up into smaller pieces, then the compiler will juggle these and fit them into other pages as required.

Best Wishes


Thanks for your help Ttelmah! I really appreaciate it.
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