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

static ROM problem

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



Joined: 07 Feb 2009
Posts: 40

View user's profile Send private message

static ROM problem
PostPosted: Tue Nov 24, 2009 5:49 am     Reply with quote

Last year I was in the process of porting the Microchip DDNS code to work with CCS - I got it compiling and working 90%. I've just decided to have a play with the code again to see if I can nail the problem however it will not compile with any version after 4.095 Rolling Eyes

Something has changed in the compiler but looking at the documented change between 4.095 and 4.096 does not show me anything remotely useful.

Here's the code that versions after 4.095 are complaining about:

Code:

static ROM WORD ddnsServicePorts[] =
{
   80,                     // DYNDNS_ORG
   80,                     // NO_IP_COM
   80,                     // DNSOMATIC_COM
};


The reported error is: "Expecting a (" for the first line above.

Anyone know what has changed here?
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Tue Nov 24, 2009 9:42 am     Reply with quote

Quite often the actual error is somewhere _above_ the stated error. Look just above to see if you can find anything.

Ronald
Ttelmah
Guest







PostPosted: Tue Nov 24, 2009 9:42 am     Reply with quote

What happens if you get rid of the satatic declaration.
I'd not expect to be able to use a static declaration, with a ROM declaration. The 'static' keyword, is telling the compiler that a writable variable, should be in RAM, that is not re-used in functaion calls. The ROM declaration is telling the compiler that this variable is fixed in ROM, and not writable. The two together, don't make any sense....

Best Wishes
eskimobob



Joined: 07 Feb 2009
Posts: 40

View user's profile Send private message

PostPosted: Tue Nov 24, 2009 12:34 pm     Reply with quote

Thanks guys. I thought the simplest thing was to change it to the following:

Code:

WORD DDNS_SERVICE_PORTS_DYNDNS_ORG         = 80;         //DYNDNS_ORG
WORD DDNS_SERVICE_PORTS_NO_IP_COM            = 80;         //NO_IP_COM
WORD DDNS_SERVICE_PORTS_DNSOMATIC_COM      = 80;         //DNSOMATIC_COM


That works fine. Obviously I have to have code later to switch select the right one into my variable but never mind. I may well end up leaving them all as port 80 anyway in which case I only need one.

No idea what the other code worked fine in earlier versions but now now Rolling Eyes
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