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

ccs error 44

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



Joined: 19 Mar 2004
Posts: 4

View user's profile Send private message

ccs error 44
PostPosted: Fri Mar 19, 2004 3:34 pm     Reply with quote

i just added a short function to my program and now i get this error:

error[44] C:\dig_controller\dig2_2.c 602 : Internal Error - Contact CCS PC_PR

It says the error is on line 602 but i only have 601 lines of code? Is it a problem linking? and if so why would it start now?(it worked fine before.)

thanks,
elliot
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

PostPosted: Fri Mar 19, 2004 8:05 pm     Reply with quote

From the help file:

Quote:

This error indicates the compiler detected an internal inconsistency. This is not an error with the source code; although, something in the source code has triggered the internal error. This problem can usually be quickly corrected by sending the source files to CCS so the problem can be re-created and corrected.

In the meantime if the error was on a particular line, look for another way to perform the same operation. The error was probably caused by the syntax of the identified statement. If the error was the last line of the code, the problem was in linking. Look at the call tree for something out of the ordinary.


Since it is reporting the error one line past your last line of code I'd take the second paragraph's advice and look at your calling tree. You may have overflowed the call stack.

Also, if you are comfortable with other people picking apart your code, you can post it here (or if very long post via a link to another web page). Please include your compiler version too.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
elliot



Joined: 19 Mar 2004
Posts: 4

View user's profile Send private message

PostPosted: Sat Mar 20, 2004 12:36 pm     Reply with quote

Thanks for the advice. I suspect I did indeed overflow the call stack as I cannot see any problem with the linking. Here is a link to my code below if you have any idea on how i can restructure it. I'm using ccs 3.181.
Thanks,
Elliot

http://www.colostate.edu/~ebuller/

click on c code.
elliot



Joined: 19 Mar 2004
Posts: 4

View user's profile Send private message

PostPosted: Sat Mar 20, 2004 12:38 pm     Reply with quote

sorry bad link..

try this.
http://www.engr.colostate.edu/~ebuller
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

PostPosted: Mon Mar 22, 2004 8:39 am     Reply with quote

elliot wrote:
sorry bad link..

try this.
http://www.engr.colostate.edu/~ebuller


Can you use something besides RAR. I don't feel like installing Stuffit or some other utility on my machine at work to deal with it.

How about just leaving it as your .C and .H ASCII files...
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
elliot



Joined: 19 Mar 2004
Posts: 4

View user's profile Send private message

PostPosted: Mon Mar 22, 2004 11:29 am     Reply with quote

Sorry. Yes, i'll post it as the .c and .h files. I finally got it to work and compile but the routine load_lcd_char() is using up a lot of rom as the compiler is designating it inline. If I add much else i get an out of rom error even though it says its using only 58% now. When I try to make the function #separate the characters don't get loaded right and show up as garbage.
Regards,
Elliot
djpark



Joined: 02 Mar 2004
Posts: 49

View user's profile Send private message

Re: ccs error 44
PostPosted: Mon Mar 22, 2004 10:00 pm     Reply with quote

elliot wrote:
i just added a short function to my program and now i get this error:

error[44] C:\dig_controller\dig2_2.c 602 : Internal Error - Contact CCS PC_PR

It says the error is on line 602 but i only have 601 lines of code? Is it a problem linking? and if so why would it start now?(it worked fine before.)

thanks,
elliot


I downloaded your program which has 604 lines and tried.

I am a newbie and I might be wrong, but I get those error messages when my program is "nearly full" capacity of ROM size. My guess is that the compiler didn't recognized that it is full but tried to put in but failed. Removing some of the less essential code or optimizing helps.

I guess you are using a modified version of lcd.c? My stock version with 3.187 defines set_tris_lcd() to set_tris_d() in the lack of use_portb_lcd. On your code, it contains "#include <16F876.h>" statement, so my compiling fails unless I change it 16F877.h. Beside some custom lcd handler...
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Mon Mar 22, 2004 11:50 pm     Reply with quote

Sorry dude, I tried your code but had more basic problems with it than a 'internal error' (djpark has already mentioned one of them).

Firstly, you are using PIC16F876 which doesn't have PORTD. So you have to add the line #define use_portb_lcd to your header file in order for the code to compile. This line tells the LCD driver to use PORTB instead of PORTD.
Secondly, I get an error on the lcd_shift_left() function. It isn't defined anywhere. Are you using a custom LCD driver, or is it defined in some other file? Same deal with lcd_load_char().

When I comment out all the lines containing those two functions, the program compiles perfectly. Here's the top of the .LST file:
Quote:
CCS PCM C Compiler, Version 3.187, 22700

Filename: D:\Designs\TMP\Hort_rev2_2.LST

ROM used: 5233 (64%)
Largest free fragment is 2048
RAM used: 113 (65%) at main() level
139 (79%) worst case
Stack: 8 worst case (7 in main + 1 for interrupts)


And a few tips:
1. Your crystal is 4MHz, so use the XT fuse, not HS.
2. Interrupts are automatically disabled in the ISR so you don't need to disable them manually. This is because the PIC architecture doesn't support interrupt re-entry.
3. You are already used all of the stack, you may want to revise your code to use less stack space. If you try to use anymore stack, I'm not sure if the compiler warns about the code being out of stack space, and the code will definitely crash at some stage.
4. You haven't initialized your PORTA and PORTC directions anywhere in the code. Remember to either set the unused bits to outputs or pull them high/low. Don't let them float in input mode.

Hope this helps.
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