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

Help I've lost my function

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








Help I've lost my function
PostPosted: Mon Apr 21, 2008 10:14 am     Reply with quote

Basically,
I have code which compiles just fine in 4.069 but after upgrading to 4.071 I am getting error 53 expecting function name. This error is not being generated by my own personally defined functions but for the predefined functions of the compiler:
output_high, output_x, disable_interrupts

I can uninstall and revert to 4.069, which I have but my coworkers are compiling on 4.071 so this is not a good idea for a long term fix. Any ideas or quick fixes.


Thanks in advance
Matro
Guest







PostPosted: Mon Apr 21, 2008 10:54 am     Reply with quote

We need the complete error message and a few line range around the line triggering the error.

Matro
sirWally



Joined: 21 Apr 2008
Posts: 1

View user's profile Send private message

PostPosted: Mon Apr 21, 2008 12:50 pm     Reply with quote

*** Error 53 "source\Peripheral.c" Line 26(4,12): Expecting Function name

code

void ConfigPorts(void)
{
//clear all the ports
output_a(0x00); //clear ports <- this is 4,12
output_b(0x00);
output_c(0x00);
output_d(0x00);
output_e(0x00);
output_f(0x00);
output_g(0x00);

it also creates the same error for several other points in the program of the same type all to do with compiler defined functions. The functions that generate this error are also not consistent. The same error will occur over and over again but each time it will happen to different compiler defined functions within my code. Again, version 4.069 works just fine so I am inclined to say this is a compiler issue. My coworker is doing just fine in 4.071 so there is probably sometype of conflict occuring on my own PC with the compiler. I am running windows XP, have done a new install of 4.071 after deleting all configuation files and all relevent registry keys that are easily associated with CCS. Perhaps I should be addressing this to the support group at CCS but I was hoping that someone else has had this problem and has found a quick solution to it such as recreating a config file or changing a hidden registry value.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 21, 2008 1:19 pm     Reply with quote

1. Post your PIC.

2. Post a short test program that incorporates that code.
The program should show the #include, #fuses, #use delay(), main(),
etc. It should be compilable. Compile the program and confirm that
it shows the error, before you post it.
Guest








PostPosted: Wed May 07, 2008 12:42 pm     Reply with quote

PICC 18F6627
Code:
#include <18F6627.h>
#device ADC=8 ICD=TRUE
#use delay(clock=7372800,RESTART_WDT)
#use rs232(baud=19200, xmit=PIN_C6, rcv=PIN_C7,ERRORS,RESTART_WDT)
#fuses HS,WDT16384,NOBROWNOUT,BORV27,PROTECT,NODEBUG
#zero_ram


This problem is not consistent. I can compile the code base just fine in 4.069 but when using 4.071 or 73 I get the same type of error. Different code bases compile fine in version 4.073 even though they do have similar calls to proprietary functions.

At times, if I recompile the code several times, up to ten, in a row then on the last attempt the compilation succeeds. This is not a consistent error, but is damn frustrating.
Guest








Still more
PostPosted: Thu May 08, 2008 12:38 pm     Reply with quote

Error:
***Error 53 "source\9522a2.c" Line 764(10,16): Expecting function name

Code:

for (i=2; i<cfg_bytes; i++)
         {
            if (!((i >= 0x12) && (i <= 0x51)))
            {
               Val1 = read_eeprom(i);
               printf(S_Putc,"%c", Val1);
               LATChecksum ^= Val1;
               CalcdChecksum += Val1;
            }
         }

         printf(S_Putc,"%c", LATChecksum); // this is line 764
         CalcdChecksum += LATChecksum;
         printf(S_Putc,"%c", 0x04);
         CalcdChecksum += 0x04;
         printf(S_Putc,"%c",(int)(CalcdChecksum >> 8));
         printf(S_Putc,"%c",(int)CalcdChecksum);


If I comment out that line and recompile it works just fine. I then add it back in and I get the same error. Note also that I had made no changes to this particular file after my last successful build of the code. I made changes in other files, then tried to compile and am now getting this type of issue again.
Guest








even more
PostPosted: Thu May 08, 2008 12:44 pm     Reply with quote

If I change the order of the code from:
Code:

printf(S_Putc,"%c", LATChecksum);
         CalcdChecksum += LATChecksum;

To:
Code:
 CalcdChecksum += LATChecksum;
printf(S_Putc,"%c", LATChecksum);


It then compiles just fine. This change does not effect my results so that is fine but this is a real problem.[/code]
Guest








More More More
PostPosted: Thu May 08, 2008 12:53 pm     Reply with quote

I then tried something else, I replaced the previous code with the following:

Code:

         for (i=2; i<cfg_bytes; i++)
         {
            if (!((i >= 0x12) && (i <= 0x51)))
            {
               Val1 = read_eeprom(i);
               printf(S_Putc,"%c", Val1);
               LATChecksum ^= Val1;
               CalcdChecksum += Val1;
            }
         }
         printf(S_Putc,"%c", 0x04);  // Line 763
         printf(S_Putc,"%c", 0x04);  // Line 764
         printf(S_Putc,"%c", 0x04);  // Line 765
         printf(S_Putc,"%c", 0x04);  // Line 766
         printf(S_Putc,"%c", 0x04);  // Line 767
         printf(S_Putc,"%c", LATChecksum);  // Line 768
         CalcdChecksum += LATChecksum;
         printf(S_Putc,"%c", 0x04);
         CalcdChecksum += 0x04;
         printf(S_Putc,"%c",(int)(CalcdChecksum >> 8));
         printf(S_Putc,"%c",(int)CalcdChecksum);


I then get the Errors as follows:

***Error 53 "source\9522a2.c" Line 763(10,16): Expecting function name
***Error 53 "source\9522a2.c" Line 764(10,16): Expecting function name
***Error 53 "source\9522a2.c" Line 765(10,16): Expecting function name
***Error 53 "source\9522a2.c" Line 766(10,16): Expecting function name
***Error 53 "source\9522a2.c" Line 767(10,16): Expecting function name
***Error 53 "source\9522a2.c" Line 768(10,16): Expecting function name

Once again I change the code and place the line
Code:

CalcdChecksum += LATChecksum;

above the printf's as such
Code:

for (i=2; i<cfg_bytes; i++)
         {
            if (!((i >= 0x12) && (i <= 0x51)))
            {
               Val1 = read_eeprom(i);
               printf(S_Putc,"%c", Val1);
               LATChecksum ^= Val1;
               CalcdChecksum += Val1;
            }
         }
         
         CalcdChecksum += LATChecksum;
         printf(S_Putc,"%c", 0x04);
         printf(S_Putc,"%c", 0x04);
         printf(S_Putc,"%c", 0x04);
         printf(S_Putc,"%c", 0x04);
         printf(S_Putc,"%c", 0x04);
         printf(S_Putc,"%c", LATChecksum);
         printf(S_Putc,"%c", 0x04);
         CalcdChecksum += 0x04;
         printf(S_Putc,"%c",(int)(CalcdChecksum >> 8));
         printf(S_Putc,"%c",(int)CalcdChecksum);


And it compiles just fine. I hope this makes my issue a little more clear.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 08, 2008 1:03 pm     Reply with quote

Is this a large program ? In multiple files ?
This may be something that CCS has to look at. Email support and ask
if you can send them a Zip of your program. Ask if they can find the
problem. Give them your user reference number so they know you own
the compiler.
Guest








again with a lost function
PostPosted: Thu May 15, 2008 4:52 pm     Reply with quote

in this example I have a call to delay_ms which, when the code is compiled, generates the same type of error.

delay_ms(150);

*** Error 53 "source\J12J21.c" Line 1544(7,15): Expecting function name

I then replace the above call with the following

delay_ms(150);delay_ms(150);

and it compiles just fine. I then remove one of the calls and the error reoccurs.

This is very frustrating
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 15, 2008 5:16 pm     Reply with quote

Quote:
Again, version 4.069 works just fine so I am inclined to say this is a compiler issue.

Then go back to using 4.069, if necessary.

Quote:

My coworker is doing just fine in 4.071 so there is probably sometype of conflict occuring on my own PC with the compiler.

Has he tried to compile your project on his machine ? If not, try it.
Guest








PostPosted: Mon Jun 16, 2008 12:15 pm     Reply with quote

This is still on going.

It is a large program with multiple files. My coworker gets the same problem with the code as well. I am really begining to hate this as I can spend up to an hour before getting a successful build. I am not joking. I really think that this means the CCS is a no go for us any longer, it is simply to costly to waste this much time in just getting the program to build.
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