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

How to open header file for specific PIC?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
richardm55



Joined: 15 Mar 2017
Posts: 12

View user's profile Send private message

How to open header file for specific PIC?
PostPosted: Thu Mar 16, 2017 1:07 pm     Reply with quote

In every C code at the beginning is always included header file of device which is programmed and I don't know to open this file. When I try to right click on this file and I chose open option this does not work and it nothing happens.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 16, 2017 2:52 pm     Reply with quote

devicename.h is just a simple datafile, easily opened with any 'text' program like Notepad, Notepad+,Word, etc.....even eXcel and HexEdit can see what's in there....
richardm55



Joined: 15 Mar 2017
Posts: 12

View user's profile Send private message

PostPosted: Thu Mar 16, 2017 3:14 pm     Reply with quote

You did not understand what I said before. I know how to open text file and I think every child does it.
I said if I hoover over that header file, ex pic18f887.h and with right mouse click I try to open I can not because it does not work at all.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 16, 2017 3:40 pm     Reply with quote

Ok, What program are you running ? MPLAB, some other IDE, ?
I know for a fact that you can't 'hover' over say PIC16F887.h in CCS program file in MPLAB and open the file. There is no mechanism for doing that. That's why I need to know what program or 'ap' as it's now called you're using.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Thu Mar 16, 2017 3:41 pm     Reply with quote

Your problem is almost certainly, that you haven't told Windows 'what' to open .h files 'with'. Right click, select 'open with', and set this to perhaps notepad. The files will then open.

If you have compiled the program, and are using the IDE, 'open all files' will show the header file.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 16, 2017 4:00 pm     Reply with quote

My impression from the OP was that he tried to open the file from within a C program not from the OS(Windows...).
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Fri Mar 17, 2017 3:01 am     Reply with quote

Quote:

You did not understand what I said before. I know how to open text file and I think every child does it.
I said if I hoover over that header file, ex pic18f887.h and with right mouse click I try to open I can not because it does not work at all.


The way he said this, made me think he was looking at the files just in explorer.
richardm55



Joined: 15 Mar 2017
Posts: 12

View user's profile Send private message

PostPosted: Fri Mar 17, 2017 12:22 pm     Reply with quote

Because we are on CCS C compiler forum so this is obvious that my question was about this program and I used it!!!
No notepad or other program!!!!
Just CCS C Compiler!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Fri Mar 17, 2017 1:14 pm     Reply with quote

The compiler (if you just have the compiler), cannot open any file, except to compile it....
You can't compile an include file on it's own.
To look at a file you have to use an editor.
Hence the 'open with', and notepad, or whatever editor you use.....

If you are using the IDE, this doesn't have any ability to let you 'hover' over a file. However you can use 'file', 'open', and then select a file.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 17, 2017 1:16 pm     Reply with quote

To open a header file, go to the File menu in the IDE that you're using.
Then click on Open, and navigate to the Devices sub-directory in the
CCS compiler directory. Then click on the .h file that you want to look at.
Example: 18F46K22.h
It will open up in a window in the IDE.
richardm55



Joined: 15 Mar 2017
Posts: 12

View user's profile Send private message

PostPosted: Sat Mar 18, 2017 4:20 am     Reply with quote

Of course, I meant CCS C Compiler IDE, not just compiler itself.
I can not still open the header PIC file from this IDE when I click open option it does not do anything. I would show that what I mean if I could attach any image file here but I don't know how to do that.

I can only see content of header file when I go manually to location of that file which is C:/Program Files(x86)/PICC/Devices/ and to open it with any text editor like notepad.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Sat Mar 18, 2017 4:49 am     Reply with quote

OK. It's the 'hover' bit that has me puzzled. You just select file, 'open', 'source file', browse to the file, select it, and click 'ok'.
jeremiah



Joined: 20 Jul 2010
Posts: 1345

View user's profile Send private message

PostPosted: Sat Mar 18, 2017 8:23 am     Reply with quote

richardm55 wrote:
Of course, I meant CCS C Compiler IDE, not just compiler itself.
I can not still open the header PIC file from this IDE when I click open option it does not do anything. I would show that what I mean if I could attach any image file here but I don't know how to do that.

I can only see content of header file when I go manually to location of that file which is C:/Program Files(x86)/PICC/Devices/ and to open it with any text editor like notepad.


I just tested it with my copy of PCWHD 5.067 and it works with right click. I would suggest sending an email to CCS support ( [email protected] ) as this is just a user forum which they don't monitor regularly. It could be a PATH or permissions issue, but they would be better suited to this type of problem.

As a side note, be careful of assuming that people know you mean the CCS IDE as many don't use it and this forum is really more targeted at the compiler. We'll still try to help if we can, but may not realize you mean PCWH or PCWHD as a lot use either MPLAB or MPLABX instead.
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Sat Mar 18, 2017 11:54 am     Reply with quote

I have PCWHD and use the IDE.
it works fine for me from version 5.064 up to 70.
Sounds like an association is messed up or missing.
If it hasn't been tried I would perform a re-install.
I've had to do this on a couple of occasions when
settings got screwed up..
_________________
Google and Forum Search are some of your best tools!!!!
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Mar 18, 2017 12:49 pm     Reply with quote

Curiosity got the better of me, so I tried my old version of PCW... and right clicked while over a header file, up pops an option 'Open file at cursor' and the file did open.. also noticed a
project option' of 'Open all files', which indeed opened every file that the program uses.
Interesting, but since I'm a dinosaur...I just use MPLAB and PCx.. it's worked reliably for 25 years so WHY change now.

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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