View previous topic :: View next topic |
Author |
Message |
jpts
Joined: 08 Mar 2017 Posts: 40
|
Error 71 |
Posted: Thu Mar 30, 2017 9:59 am |
|
|
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
|
|
Posted: Thu Mar 30, 2017 10:27 am |
|
|
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
|
|
Posted: Thu Mar 30, 2017 11:07 am |
|
|
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
|
|
Posted: Thu Mar 30, 2017 12:49 pm |
|
|
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
|
|
Posted: Thu Mar 30, 2017 3:09 pm |
|
|
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 ? |
|
|
|