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
ccmcca



Joined: 08 Oct 2005
Posts: 13

View user's profile Send private message Send e-mail

Out of ROM, A segment or the program is too large
PostPosted: Sat Mar 11, 2006 5:34 pm     Reply with quote

How can i fix this problem? I cant compile the program because of this ERROR


#int_COMP

COMP_isr()
{
printf("%03.2f\r\n ",2.19-(get_timer1())*0.4*0.00034);
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 11, 2006 11:18 pm     Reply with quote

I suspect that you're using a small PIC that has a very limited amount
of ROM, or that has small ROM pages. The problem is likely caused
by your use of floating point math, which requires a lot of ROM.

Post the PIC that you're using and also the version of your compiler.
Guest








16f627
PostPosted: Sun Mar 12, 2006 12:32 pm     Reply with quote

I am using this PIC what you suggest?
In that number of I/O PORTS...
Thanks.-
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Mar 12, 2006 12:56 pm     Reply with quote

I put your isr into a test program and it uses 93% of ROM with PCM vs.
3.245. The amount of ROM used is given at the top of the .LST file,
which is in your project folder.

The easiest way to get more ROM in a compatible pinout would be
to go to the 16F628. That would give you 2K ROM instead of only 1K.
However, if insist upon using floating point, you will quickly use up that
extra ROM. If you want to use floating point, you should redesign your
circuit to use a PIC that has 8K ROM at least.

Code:
#include <16F627.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_B2, rcv=PIN_B1, ERRORS)

#int_COMP
COMP_isr()
{
printf("%03.2f\r\n ",2.19-(get_timer1())*0.4*0.00034);
}

//===============================
void main()
{

while(1);
}
Guest








PostPosted: Sun Mar 12, 2006 3:14 pm     Reply with quote

ThankS!!!!!
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