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

Error 71

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



Joined: 08 Mar 2017
Posts: 40

View user's profile Send private message

Error 71
PostPosted: Thu Mar 30, 2017 9:59 am     Reply with quote

Why message error below ? The program Rom was 44% and adding couple line of program, it shows the message error.

"Error 71 Out of Rom, A segment or the program is too large SerialData."


Note: Serial Data is a function to read incoming serial data.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 30, 2017 10:27 am     Reply with quote

re: A segment or the program is too large

short answer...

The compiler is telling you that the additional code you've added to your program cannot fit into the program space. PICs (little ones) have memory based upon segments and an entire 'function' MUST fit within a segments boundaries. If your function is say 5KB long and a segment is 4KB, then it cannot fit, hence the error message.If the function is 3KB long and there's already a 2KB function, again, the compiler can't put them both in the same segment.
Now you may get lucky IF you rearrange the functions and see if the compiler can fit them into code space better. If that doesn't work, then you may be able to break down a big functions into two or more smaller 'sub functions', again the compiler will try it's best to fit it all in.

Others may have hints or tricks they can post to help.
jpts



Joined: 08 Mar 2017
Posts: 40

View user's profile Send private message

PostPosted: Thu Mar 30, 2017 11:07 am     Reply with quote

I understand what you posted...but not how to implement into program. How to break sub funcion? Can give example
I am using 16F876. This message appears when I add a variable int16.

Tks
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Thu Mar 30, 2017 12:49 pm     Reply with quote

It's been covered many times here before. For example, have a look at this thread:

<http://www.ccsinfo.com/forum/viewtopic.php?t=55328&highlight=rom+segment++program+programme>

Look at the version that does compile, and then look at what the largest single 'lump' of stuff is in this. Then see if you can split this up.
jpts



Joined: 08 Mar 2017
Posts: 40

View user's profile Send private message

PostPosted: Thu Mar 30, 2017 3:09 pm     Reply with quote

I read all post related....and the solution was spliting in subroutine calling all from Main(). On top of each routine (total of 2) added #separate. Its compile !

Can use this way as a solution ?
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