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

Problem Compiling

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



Joined: 06 Oct 2006
Posts: 13

View user's profile Send private message

Problem Compiling
PostPosted: Mon Jan 19, 2015 1:42 pm     Reply with quote

Problem Compiling for 16F1718 using V 5.036
*** Error 28 "C:\Program Files (x86)\PICC\Devices\16F1718.h" Line 360(34,35): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files (x86)\PICC\Devices\16F1718.h" Line 361(2,5): Expecting a (
*** Error 48 "C:\Program Files (x86)\PICC\Devices\16F1718.h" Line 361(6,13): Expecting a (
*** Error 43 "C:\Program Files (x86)\PICC\Devices\16F1718.h" Line 361(34,36): Expecting a declaration
*** Error 43 "C:\Program Files (x86)\PICC\Devices\16F1718.h" Line 361(35,36): Expecting a declaration
8 Errors, 0 Warnings.
Build Failed.
Just trying to get the LED blink to work first.
Code:
#include <NCO.h>

void main()
{

   //Example blinking LED program
   while(true)
   {
      output_low(LED);
      delay_ms(DELAY);
      output_high(LED);
      delay_ms(DELAY);
   }

}
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 1:50 pm     Reply with quote

Since the fault is in nco.h (as this is what loads the include file), post this.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 1:54 pm     Reply with quote

Edit the 16F1718.h file and comment out these lines:
Code:

// #bit PWM1OUT=getenv("BIT:PWM1OUT") 
// #bit PWM2OUT=getenv("BIT:PWM2OUT") 
// #bit PWM3OUT=getenv("BIT:PWM3OUT") 
// #bit PWM4OUT=getenv("BIT:PWM4OUT")
 

Then it will compile OK.
dish_moose



Joined: 06 Oct 2006
Posts: 13

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 2:34 pm     Reply with quote

Here it is:
Code:
//////////// Standard Header file for the PIC16F1718 device ////////////////
#device PIC16F1718


+++++++++++++++++++++++++
Header file code removed.
Reason: Forum rule #10.
10. Don't post the CCS example code or drivers. This includes header files for devices (example 18f452.h).
http://www.ccsinfo.com/forum/viewtopic.php?t=26245
- Forum Moderator
+++++++++++++++++++++++++
dish_moose



Joined: 06 Oct 2006
Posts: 13

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 2:47 pm     Reply with quote

As soon as I get permission to change the file - I'll give it a try.
Win 8.1....
-Thanks, Bruce
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Jan 19, 2015 5:03 pm     Reply with quote

dish_moose wrote:
//// (C) Copyright 1996, 2014 Custom Computer Services ////
//// This source code may only be used by licensed users of the CCS C ////
//// compiler. This source code may only be distributed to other ////
//// licensed users of the CCS C compiler. No other use, reproduction ////
//// or distribution is permitted without written permission. ////
[/code]
Why is it that never anyone reads this part and behaves accordingly? Rolling Eyes
All users on this forum already have this file, so there is no reason at all to post it.
dish_moose



Joined: 06 Oct 2006
Posts: 13

View user's profile Send private message

PostPosted: Tue Jan 20, 2015 2:26 pm     Reply with quote

Sorry - I was in a hurry - thought I was posting nco.h not 1718 .h
I was told the error was in nco.h and to post it but the error is in 1718.h
If Official support had answered me back in a timely fashion I would not have been in this situation.

One more thing, commenting out info in a header file worked yet I have no idea why. Can anybody explain why? Does this mean when I go to use the nco function or PWM output they will not function properly?
-Bruce
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 20, 2015 2:33 pm     Reply with quote

It likely means that CCS forgot to define those bit names in the device
database file. That should have no effect on pwm function. However,
it does allow the possibility that the pwm functions may have other bugs
for that PIC with that compiler verison.
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