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

Maximum number of global bits?

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



Joined: 17 Sep 2003
Posts: 97
Location: Atlanta, GA, USA

View user's profile Send private message

Maximum number of global bits?
PostPosted: Fri Jul 18, 2008 2:16 pm     Reply with quote

This post is an extension of an earlier post: http://www.ccsinfo.com/forum/viewtopic.php?t=34506
I have managed to code around the previous post's bug painfully, by not adding any new defines for months. Until now, as long as I do not add a #define I can keep adding and revising code. Painful!


I'm using PCH version 4.071 with a PIC18F8722 target on a gigantic (126768 bytes ROM used) application. The program is comprised of 20 header files and 18 C files. I am awaiting my 4.076 upgrade key.

Déjà vu - We start with a working, compiling program, that is error free. Then I add one new global bit:
Code:
int1   gbIrDAMasked = false;

I get an error
Quote:
Error 53 "C:\Devel\PIC-C\Atlanta\Atlanta-Mode.c" Line 49(1,8): Expecting function name

The error refers to a completely different system, and does not look like an error to me (and remember, it compiled before we added the new definition). Here is Line 49 from the referenced file:
Code:
fprintf(TERM,"Toggle reverse valve");

When I simply remark the new global bit out of the code, the project once again compiles successfully.

Again, to cover the bases, I have tried:
    * moving the global bit to a different location of the header file
    * changing the variable name
    * putting it in another header file

In all cases the project will not compile, reports the same error, until I remove this extra global bit.

Like the previous post, since it does not have to do with the name, the value, or the location, I now have to wonder if there is a maximum number of global bits one can define in PCH? I think it is either that or we are hitting the roof on the capabilities of the CCS compiler itself.

Since I know I'll be asked, here is the entire small header file that contains the new bit:
Code:
///////// IrDA Interface Header File/////////

// Program Value Definitions
#define IRDA_I_BUFFER_SIZE 255                                 // IrDA input buffer size
#define IRDA_PORT 2                                             // The serial port # for IRDA

///////////// Includes /////////////
#include "Dev-AT24C1024.c"                                       // I2C EEPROM Device Interface
#include "STDLIBM.h"                                             // Memory Handling Header File

///////////// Shared Variables /////////////
int1   gbIrDAMasked = false;


And here is the whole subroutine that fails when I add a new global bit:
Code:
//--------------------------------------------------------------------------
// Toggle the reversing valve.
//
void AtlMode_Reverse(void) {
   if(giRunMode == RUN_TEST) {
      gsTestState.bRev = !gsTestState.bRev;                           // Toggle the reversing valve
      if(gsTestState.bRev) {
         if(gsTestState.iStage > gsSetting.iNumStages) gsTestState.iStage = gsSetting.iNumStages;
      }
fprintf(TERM,"Toggle reverse valve");
AtlTerm_CRLF();
   }
   return;
}


Once again, thanks in advance!
-Kyle
kda406



Joined: 17 Sep 2003
Posts: 97
Location: Atlanta, GA, USA

View user's profile Send private message

PostPosted: Fri Jul 18, 2008 2:44 pm     Reply with quote

Yay, after a while I received my 4.076 upgrade key, the bug went away. Everything compiles "as-is", with no errors, with the new bit, with no other changes, on 4.076.

(Now I will see if I can add some new #define statements too...)

-Kyle
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