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 , 16F877 ....

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



Joined: 02 Apr 2008
Posts: 1

View user's profile Send private message

out of ROM , 16F877 ....
PostPosted: Wed Apr 02, 2008 7:27 am     Reply with quote

I have the compilation error , error 71 out of rom as said in the topic.

The problem is that when i use the same program, the same ICD module, and the same card with the same pic at school, this error doesnt appear.
My question is : why when i try to compile the program at home have i this error?

I took the CCS config file, from my school post and the error still...
Matro
Guest







PostPosted: Wed Apr 02, 2008 7:42 am     Reply with quote

Post your preprocessor lines, i.e. all lines beginning with #, that you are using.

Matro
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 02, 2008 9:36 am     Reply with quote

Quote:
why when i try to compile the program at home have i this error?

If everything else is the same except for the compiler, it probably means
you're using the demo compiler at home. The demo is limited to 2K ROM:
http://www.ccsinfo.com/demopoll.php
Fred8
Guest







PostPosted: Mon May 05, 2008 9:33 am     Reply with quote

Hello,

I have the same problem of error 71 "out of rom segment : MAIN".

I have a main sub (24% of memory on my 16F877A : 8192b) and an interrupt sub routine (app 5% of ROM).

When I insert a call to a function in the interrupt sub (#INT_RB), the error appears. If I put this function into the main, the error does not appear anymore. If I add more functions, delays or others in the main loop, no memory problem, even in excess of 2k !!!

I need to run a program in the interrupts, so I which I will understand...

If you have ideas, I'm your man !
Thanks
Matro
Guest







PostPosted: Mon May 05, 2008 9:40 am     Reply with quote

Post a small compilable code that demonstrates the problem (with all preprocessor directives).

Do you use #ORG instructions?
What is your compiler version?

Matro
Fred8
Guest







PostPosted: Mon May 05, 2008 11:05 am     Reply with quote

No, I don't use #ORG.

My compiler version is V4.057.
My MpLab version is 8.01 (using IDE for my ICD2).
My OS is Win XP SP2.
My age is 29 (maybe not the most important).

I tried to compact my code, but the error disapears...(my code is not very "compact" : about 2k of ROM, and it needs some files and libraries).

I develop a trigger with a delayed output (interrupt on an input, output on a pin and on another with a delay from 0.1 to 5000ms. The delay is adjustable by the user via 3 push-buttons and a 2x16 LCD.

In the main : the init, splash screen, and that's all.
In the interrupt routine, the delay, and I wish, a screen with the system state.
The problem is that when I introduced a function like lcd_gotoxy(x,y) in this interrupt routine, the compiler say me the code is out of space.
I can place this function in the main, and have no problem.
Matro
Guest







PostPosted: Mon May 05, 2008 11:10 am     Reply with quote

Try to add "#separate" just before the declaration of the function "lcd_gotoxy()"

Matro
Fred8
Guest







PostPosted: Mon May 05, 2008 1:35 pm     Reply with quote

Same result...

May it be a problem of memory allocation (stack / heap)?
A compiler issue?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 05, 2008 1:41 pm     Reply with quote

See this post about re-arranging your code to fit in a PIC:
http://www.ccsinfo.com/forum/viewtopic.php?t=34265&start=7
Matro
Guest







PostPosted: Tue May 06, 2008 1:20 am     Reply with quote

You can eventually copy-paste here the .err file.

Matro
Fred8
Guest







PostPosted: Fri May 09, 2008 5:01 am     Reply with quote

OK, many thanks for the command line, the solution was here !
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