View previous topic :: View next topic |
Author |
Message |
richardm55
Joined: 15 Mar 2017 Posts: 12
|
How to open header file for specific PIC? |
Posted: Thu Mar 16, 2017 1:07 pm |
|
|
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: 9245 Location: Greensville,Ontario
|
|
Posted: Thu Mar 16, 2017 2:52 pm |
|
|
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
|
|
Posted: Thu Mar 16, 2017 3:14 pm |
|
|
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: 9245 Location: Greensville,Ontario
|
|
Posted: Thu Mar 16, 2017 3:40 pm |
|
|
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: 19545
|
|
Posted: Thu Mar 16, 2017 3:41 pm |
|
|
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: 9245 Location: Greensville,Ontario
|
|
Posted: Thu Mar 16, 2017 4:00 pm |
|
|
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: 19545
|
|
Posted: Fri Mar 17, 2017 3:01 am |
|
|
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
|
|
Posted: Fri Mar 17, 2017 12:22 pm |
|
|
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: 19545
|
|
Posted: Fri Mar 17, 2017 1:14 pm |
|
|
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
|
|
Posted: Fri Mar 17, 2017 1:16 pm |
|
|
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
|
|
Posted: Sat Mar 18, 2017 4:20 am |
|
|
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: 19545
|
|
Posted: Sat Mar 18, 2017 4:49 am |
|
|
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: 1355
|
|
Posted: Sat Mar 18, 2017 8:23 am |
|
|
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: 1934 Location: Norman, OK
|
|
Posted: Sat Mar 18, 2017 11:54 am |
|
|
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: 9245 Location: Greensville,Ontario
|
|
Posted: Sat Mar 18, 2017 12:49 pm |
|
|
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 |
|
|
|