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

Problem Compiling for 16F1508 using V 5.016

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



Joined: 17 Jan 2014
Posts: 2

View user's profile Send private message

Problem Compiling for 16F1508 using V 5.016
PostPosted: Wed Jul 23, 2014 11:45 am     Reply with quote

Hi,

I'm trying to implement a DHT22 using the code from the Code Lib RHT03 Driver http://www.ccsinfo.com/forum/viewtopic.php?t=52077&highlight=dht22

I copied the source code and created a RHT03.c an put it in the driver lib.

When I compile it is Version 5.016 I get the following errors. Can someone help we understand what the problem is?

Am I doing someting wrong in the compiler?

*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 537(35,36): Expecting an identifier Bad SFR name
*** Error 12 "C:\Program Files\PICC\devices\16F1508.h" Line 538(2,5): Undefined identifier
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 538(6,12): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 538(35,36): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 538(35,36): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 539(35,36): Expecting an identifier Bad SFR name
*** Error 12 "C:\Program Files\PICC\devices\16F1508.h" Line 540(2,5): Undefined identifier
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 540(6,12): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 540(35,36): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 540(35,36): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 583(34,35): Expecting an identifier Bad SFR name
*** Error 110 "C:\Program Files\PICC\devices\16F1508.h" Line 584(5,6): Expecting a .
*** Error 43 "C:\Program Files\PICC\devices\16F1508.h" Line 584(13,14): Expecting a declaration
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 584(34,35): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 585(2,5): Expecting a (
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 585(6,13): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 585(34,35): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 586(2,5): Expecting a (
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 586(6,13): Expecting a (
*** Error 28 "C:\Program Files\PICC\devices\16F1508.h" Line 586(34,35): Expecting an identifier Bad SFR name
*** Error 48 "C:\Program Files\PICC\devices\16F1508.h" Line 586(34,35): Expecting a (
21 Errors, 0 Warnings.
Build Failed.

Ray
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 23, 2014 1:28 pm     Reply with quote

I didn't get that at all. It worked fine for me. Here is the compiler
output in MPLAB:
Quote:
Executing: "C:\Program files\Picc\CCSC.exe" +FM "C:\Program Files\PICC\Projects\PCM_Test\PCM_Test.c" +DF +LY -T -A +M -Z +Y=9 +EA -EW
Memory usage: ROM=32% RAM=5% - 24%
0 Errors, 0 Warnings.
Build Successful.
Loaded C:\Program Files\PICC\Projects\PCM_Test\PCM_Test.cof.
BUILD SUCCEEDED: Wed Jul 23 12:20:58 2014


I did these steps:
1. I installed CCS vs. 5.016. I have the command line versions, so I
installed both PCM and PCH, even though only PCM is needed for this test.

2. I went to Program Files / PIC-C in the Windows Start button menu,
and I ran the Compiler Version program. I clicked on the "View Other
Versions" button, and then I double-clicked on the PCM and PCH boxes
for vs. 5.016 until they were set in bold. I then exited that window.

3. I went to the Code library link and copied and pasted his test program
into my "pcm_test.c" file that I have as a general purpose test project
in MPLAB.

4. I opened a new file in MPLAB, and I copied and pasted his RHT03.c
code into that new file. I then clicked "Save as" and saved it as RHT03.c
in the pcm_test project directory.

5. I then went to the MPLAB Configure menu and selected 16F1508 as
the PIC.

6. I pressed the "Build All" button in MPLAB and compiled it with no errors.
Ray Frier



Joined: 17 Jan 2014
Posts: 2

View user's profile Send private message

Problem Compiling for 16F1508 using V 5.016
PostPosted: Thu Jul 24, 2014 1:38 pm     Reply with quote

Thank you for the detailed response.

OK, that is very different than what I did, I used the CCS IDE (v 5.016). I created a source file and copied the code from the post in the Code Lib. I also copied the code for the RHT03.C driver and placed it in the PICC Drivers. And ran the compile.

I'll follow what you have outlined and give that a try next.

Thanks, Ray
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