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 ... Out of ROM, A segment or the program is too lar
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



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

View user's profile Send private message

PostPosted: Tue Jul 19, 2016 7:28 pm     Reply with quote

re: Mr. T's comment...
However on a PIC18, the memory is generally no longer paged (there are paging limitations that appear over 64K).
and this...
Seg 00188-00FFE, 006E left, need 0016A
Seg 00000-00002, 0000 left, need 0016A Reserved
Seg 00004-00006, 0004 left, need 0016A
Seg 00008-00186, 0000 left, need 0016A Reserved

I don't think 'paging' is the issue rather the entire program is just too big?
this
Seg 00188-00FFE, 006E left, need 0016A
seems to say he needs 16A words but only 6E are available

so I'm really confused.
Now I'd assume that a bigger PIC(more mem) would solve this but he says that 1/2 works... On V4 it's OK, V5, it doesn't.
still more confusion, though I suspect maybe V5 default to 'protection' high mem, some 'fuse' setting is wrong(bug ??) or something that we cannot see ,since we don't have the first 20 lines of code(fuses,etc.)
Another curious thing ,to me, is the 'Reserved' at the end of the Seg printouts. I admit I have no idea what or why they are there but I don't make a living with PICs anymore and heck if code compiles and runs, well, that's what matters.

I'm thinking were missing some crucial details.....

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Wed Jul 20, 2016 1:11 am     Reply with quote

Light is suddenly dawning.....

He talks about the 18F2220, yet the listing shows 2K.
The 'new' version he has got is the demo compiler, not he full copy of CCS. Limited to 2K program size.

Duh....
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Thu Jul 21, 2016 10:05 am     Reply with quote

Thanks for your help Ttelmah and Temtronic
I now can compile when I have suppressed all my JBus fuctions !
(but I need them)
Anyway, when I modify my code somewhere else, I get the error again.

Now, when I type a character, I wonder wether it will produce an error 71 or not. It is very unconfortable !!!

For example this code works
Code:
if(SFLS.Local!=ELR)
   {
      SFLS.Local=ELR;
      SFLS.Changed=TRUE;
   }   
   if (SFLS.Local) Read_Switches_Local();               // ne prendre que les commandes locales
   //else Read_Switches_Remote();   

But this one does not
Code:
if(SFLS.Local!=ELR)
   {
      SFLS.Local=ELR;
      SFLS.Changed=TRUE;
   }   
   if (SFLS.Local) Read_Switches_Local();               // ne prendre que les commandes locales
   else Read_Switches_Remote();   


And there I need to read all my code and find a routine to split in 2 and or #separate !!!

Do you, or anybody, know a method to avoid this, I mean thinking to my code, not having a sword of Damocles over my head, I cannot add #separate every routine, nor split everything in 10 (not more) lines of code !!!
Am I wrong ?

(Why the compiler cannot optimise by itself to allocate where it is the most efficient ?)

I think this way of working is really a handicap
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Thu Jul 21, 2016 10:16 am     Reply with quote

As Ttelmah commented, stop using the demo version of the compiler. Get the full version.
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Thu Jul 21, 2016 10:29 am     Reply with quote

Sorry
I don't understand
I use the same version V4 I always used bought to CCS, and my pch.crg is dated 07/01/2013

How can I see that I have a demo version and not a full version, and why would I have a demo version and not a full one ?
temtronic



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

View user's profile Send private message

PostPosted: Thu Jul 21, 2016 10:30 am     Reply with quote

this...
The 'new' version he has got is the demo compiler, not the full copy of CCS. Limited to 2K program size.
....

This now makes 100% sense as to WHY you're running into the 'problem'. You're at the LIMIT of the compiler version(demo) that you are using. You can't put size 12 feet into size 7 shoes ! Well, not easily!!

So now you have 2 and only two options

1) buy the real compiler from CCS. That way you will NOT have a 'memory' problem.

2) get very,very 'creative' in code cutting. In the good old days you HAD to be creative and could get a HUGE program into a small space.

Option 1 is probably your best choice as it gets you 'up and running' for a few bucks.
Option 2 will force you to become a pretty good code cutter but could take months in not years.

Jay
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Thu Jul 21, 2016 10:37 am     Reply with quote

temtronic wrote:


1) buy the real compiler from CCS. That way you will NOT have a 'memory' problem.

Jay


OK

The problem is that I bought a full version to CCS, and received the package with book and CD licensed nbr Pxxxxxxxxx I have pch.crg file in my directory.

I really am irritated if it is not a full version.

So I think I will email to CCS and ask the question.
temtronic



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

View user's profile Send private message

PostPosted: Thu Jul 21, 2016 12:28 pm     Reply with quote

silly question...
did you previously download the 'demo' version ?

If so, then I assume your PC is going to it to run the compiler. That would explain the 2K limit.

Since you bought a complete version, I suggest you uninstall the 'demo', then install the one CCS supplied, following their instructions.

Jay
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Jul 21, 2016 12:56 pm     Reply with quote

To answer your earlier question, the version is shown at
the top of the .LST file. If it has a "d" on the end of the
version it is a demo...

i.e. CCS PCM C Compiler, Version 5.032d
_________________
Google and Forum Search are some of your best tools!!!!
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Fri Jul 22, 2016 12:56 am     Reply with quote

dyeatman wrote:
To answer your earlier question, the version is shown at
the top of the .LST file. If it has a "d" on the end of the
version it is a demo...

i.e. CCS PCM C Compiler, Version 5.032d


Thanks, dyeatman, for this info.

My .lst file begins with the following :
Code:
CCS PCH C Compiler, Version 4.140, xxxxx              22-juil.-16 07:38

               Filename:   C:\Users\Flashelek\Desktop\V2 - 3\cms.lst

               ROM used:   4068 bytes (99%)
                           Largest free fragment is 28
               RAM used:   369 (72%) at main() level
                           402 (79%) worst case
               Stack:     8 worst case (6 in main + 2 for interrupts)


This morning, I have an answer from sales@Ccs and they tell that, in their records, I have a full version
V4 bought in 2013 with the number Pxxxxxxxx and V5 recently downloaded with number Pxxxxxxxx

So, my problem stays whole
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Fri Jul 22, 2016 1:24 am     Reply with quote

You are missing the point.

You were complaining that V5 on a different workstation, would not compile the code, but V4 did. That you got the 'out of memory' error with V5.
The posting you made of the error from V5, shows that the V5 compiler you are running is either the demo version, or you have an org statement in your code restricting the memory space it can use, which is why _it_ complained about the memory size.
The V4 compiler was a full version, so didn't.
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Fri Jul 22, 2016 2:12 am     Reply with quote

I compiled my project in 2013 with V4 version and it worked
As customer asks for changes, we have made pcb changes and need to adapt software for it..
So, when I have tried to compile with these modifications, I before updated to V5.
I had Error 71 and then posted here.
Thinking V5 had a problem, I came back to V4, normally as it worked in 2013 it has to work now !
No : Error 71

And then you explain me that I surely own a demo version.

I look at .lst file (as told by dyeatman) and see I have a full V4 version
Code:
CCS PCH C Compiler, Version 4.140, xxxxx               22-juil.-16 07:38

Regarding V5 I do not know how to verify because, as it does not compile I have no .lst file and cannot see. But sales@ccsinfo mailed me this morning that I have both full versions.

I need to go forward with my project so I do not want to lose time and come back to V5 which shows me other problems (it does not recognise IC1 constant in #use I2C(master, fast=400000,I2C1) for example !!!), I prefer to presently stay with V4 version.

Which seems to be a full version, no ?

So, what did I did wrong ?

I have no #ORG statement in my .h file.
temtronic



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

View user's profile Send private message

PostPosted: Fri Jul 22, 2016 4:53 am     Reply with quote

this....
ROM used: 4068 bytes (99%)
Largest free fragment is 28


tells me you've run out of memory space !!
Out of 4096 possible locations ALL but 28 are used.

You need to upgrade to a PIC with more program memory. I typically use the 18F46K22 which has 64K of memory so I've never run out.Hopefully there's a PIC in the same 'family' that is pin compatible,with same peripherals.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19496

View user's profile Send private message

PostPosted: Fri Jul 22, 2016 4:57 am     Reply with quote

The key thing to do, is to compile something short with V5. A one line test program. This then will display the version number being used.

Also if you have ever installed the test version, 'step back'. Un-install this, and the existing V5, Make sure the PICC directories are removed, and then do a clean install of V5.

Point is that every chip you refer to has a larger memory size than in being actually displayed. Similarly you mentioned at one point switching to a 16K chip, and getting the same result. The error printout, shows the compiler limiting the compile size to the 2K limit associated with the demo version, so it is all behaving as if (somehow) it thinks you have this....
If you downloaded the latest version, are you sure you went to the 'downloads', 'compiler updates', not 'compiler demo'?. The tabs are next to one another.
Jean FOUGERON



Joined: 30 Nov 2012
Posts: 110
Location: France

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

PostPosted: Fri Jul 22, 2016 7:14 am     Reply with quote

Thanks to all of you
I inserted a PIC18F2520 which is 16k and it runs (with V4)

Very Happy

as soon I have time, I try with V5

But first, finish the project and deliver to customer

Have a good WE, expecting nothing else appears
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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