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, A segment of the program is too large main Seg

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







Out of ROM, A segment of the program is too large main Seg
PostPosted: Sat Oct 14, 2006 1:43 am     Reply with quote

After writing a program in C++ for PIC 877A, i got fllowing error

"Out of ROM, A segment of the program is too large main Seg 00035"

I am using PIC C Compiler version 3.249. Following is the working algo of my program;

main()
{

while()
{
function_1()
................
................
function_2()
................
................
function_3()
}
}
/**************************/
function_3()
{
function_3_1()
................
................
function_3_2()
}
/**************************/
function_3_2()
{
function_3_2_1()
.................
................
function_3_2_1()
..............
..............
function_3_2_1()

}
/**************************/

The function_3_2_1() is

lcd_putc("\f"Hello);

which I am calling four times. This is compiler inbuilt function. Inside function_3_2() if I dont call function_3_2_1() then this error is eliminated. If you need tyhe original code then I can slo paste that

Thankyou very mush for reading my problem. I am waiting for reply

Regards

Faheem Khan
Ttelmah
Guest







PostPosted: Sat Oct 14, 2006 2:46 am     Reply with quote

Try doing a search of the forum for this error. The fix has been published here, probably several dozen times. What is almost certainly happening, is that most of your functions are being coded as 'inline' (since this is quicker in execution), and unless you force them to be 'separate', this will make the main program become huge.

Best Wishes
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