View previous topic :: View next topic |
Author |
Message |
Jordanel
Joined: 26 Mar 2016 Posts: 17
|
MPLABX + CCS error when building |
Posted: Sun Mar 27, 2016 8:36 am |
|
|
I'm really sorry to start a second thread. I install Windows 7 on a virtual machine and I'm running MPLABX + CCS compiler, however I get this error can anyone help or do I have to use only CCS?
Code: |
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
make -f nbproject/Makefile-default.mk dist/default/production/CCS2.X.production.hex
make[2]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
gnumkdir -p build/default/production
gnumkdir -p dist/default/production
"C:\PROGRA~1\PICC\CCSCON.exe" out="build/default/production" CCS2.c +FB +DF +CC +Y=9 +EA +DF +LN +T +A +M +J +EA +Z -P #__12F509=1
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:3:10: Error#18 File can not be opened
Not in "C:\Program Files\PICC\devices\12509.h"
Not in "C:\Program Files\PICC\drivers\12509.h"
Not in local "12509.h"
Not in local "C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\12509.h"
Not in last "12509.h"
Not in project "C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\12509.h"
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:18:7: Error#128 A #DEVICE required before this line
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:20:5: Error#128 A #DEVICE required before this line
3 Errors, 0 Warnings.
Build Failed.
nbproject/Makefile-default.mk:99: recipe for target 'build/default/production/CCS2.o' failed
make[2]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
make[2]: *** [build/default/production/CCS2.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 2s)
|
|
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1358
|
|
Posted: Sun Mar 27, 2016 9:01 am |
|
|
it looks like the file 12509.h file doesn't exist in your install of ccsc. Can you verify it is in the install directory of the virtual machne? Are you using the 45 day demo version of the compiler and is it within the 45 days since download? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Mar 27, 2016 9:11 am |
|
|
Quote: | "C:\PROGRA~1\PICC\CCSCON.exe" out="build/default/production" CCS2.c +FB +DF +CC +Y=9 +EA +DF +LN +T +A +M +J +EA +Z -P #__12F509=1
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:3:10: Error#18 File can not be opened
Not in "C:\Program Files\PICC\devices\12509.h"
|
There is no 12509.h file. It's called 12F509.h. Fix your #include line. |
|
|
Jordanel
Joined: 26 Mar 2016 Posts: 17
|
Yes there is. |
Posted: Wed Mar 30, 2016 5:42 am |
|
|
I usually have to point to the header file in MPLAB, but I did and I get the same error. If anyone has been using MPLAB in the project files there is header, I added the .h file in the header files if this is all than it should be working? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9255 Location: Greensville,Ontario
|
|
Posted: Wed Mar 30, 2016 7:00 am |
|
|
as PCMP points out you've got the wrong header file.
show us your new 'error'..
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19568
|
|
Posted: Wed Mar 30, 2016 12:23 pm |
|
|
I think the original poster is missing the point fractionally.
He talks about changing the MPLAB settings, but the fundamental problem is the wrong filename in the source code. Line 3 of his CCS2.x file, has the wrong filename in it. This needs to be corrected. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Mar 30, 2016 1:21 pm |
|
|
Jordanel wrote: |
Yes there is.
|
Post the full directory path for the file, so we can see where it is. |
|
|
Jordanel
Joined: 26 Mar 2016 Posts: 17
|
|
Posted: Sun Apr 03, 2016 4:28 am |
|
|
Header Files
'../../../../../../Program Files/PICC/Devices/12F509.h'
Code: |
CLEAN SUCCESSFUL (total time: 842ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
make -f nbproject/Makefile-default.mk dist/default/production/CCS2.X.production.hex
make[2]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
gnumkdir -p build/default/production
gnumkdir -p dist/default/production
"C:\PROGRA~1\PICC\CCSCON.exe" out="build/default/production" CCS2.c +FB +DF +CC +Y=9 +EA +DF +LN +T +A +M +J +EA +Z -P #__12F509=1
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:3:10: Error#18 File can not be opened
Not in "C:\Program Files\PICC\devices\12509.h"
Not in "C:\Program Files\PICC\drivers\12509.h"
Not in local "12509.h"
Not in local "C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\12509.h"
Not in last "12509.h"
Not in project "C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\12509.h"
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:18:7: Error#128 A #DEVICE required before this line
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:20:5: Error#128 A #DEVICE required before this line
3 Errors, 0 Warnings.
Build Failed.
nbproject/Makefile-default.mk:99: recipe for target 'build/default/production/CCS2.o' failed
make[2]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2/CCS2.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [build/default/production/CCS2.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 23s)
|
[img][/img] |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9255 Location: Greensville,Ontario
|
|
Posted: Sun Apr 03, 2016 5:40 am |
|
|
OK, I ain't the brightest light bulb but...
what does this...
I install Windows 7 on a virtual machine
..mean ?
What is a 'virtual machine' ?
Cause I'm sure there's a lot of guys here coding PICs on real PCs with W7.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19568
|
|
Posted: Sun Apr 03, 2016 6:27 am |
|
|
I worry about something else as well.
CCS2.
I went back to 2002, in my archives, and we were already in 3.094!... The devices list for that doesn't have the 12F509. We are still on 12C509 at that point!...
The compiler sounds as if it may be nearly 20 years old!...
The 12F509, didn't come out till 2005. 3.191, does not have the file for this chip, while 3.221 does. The compiler he has is about 200 compiler versions too old.....
If he wants to use an antique compiler, then he needs to be using a chip of the same era.
One of the late standard MPLAB releases, comes with a copy of PCB, that _is_ late enough to support the chip. Somebody will know which versions this applies to. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Apr 03, 2016 7:53 am |
|
|
Jordanel wrote: |
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:3:10: Error#18 File can not be opened
Not in "C:\Program Files\PICC\devices\12509.h"
BUILD FAILED (exit value 2, total time: 23s)
|
This is the last time I'm going to tell you this.
Your #include line in your program refers to 12509.h.
There is no 12509.h file. You have shown that in your post
below. The real filename has an 'F' after the '12'. You have
left this 'F' out. This is a typo or a mistake.
The file you found on your PC, shown below by you, has the 'F' in the middle:
Jordanel wrote: | Header Files
'../../../../../../Program Files/PICC/Devices/12F509.h'
|
Your #include line must have the correct filename in it, as shown below:
Code: | #include c:\Program Files\PICC\devices\12F509.h" |
|
|
|
Jordanel
Joined: 26 Mar 2016 Posts: 17
|
This time I understand why it doesnt have the file! |
Posted: Sun Apr 03, 2016 9:15 am |
|
|
PCM programmer wrote: | Jordanel wrote: |
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.X\CCS2.c:3:10: Error#18 File can not be opened
Not in "C:\Program Files\PICC\devices\12509.h"
BUILD FAILED (exit value 2, total time: 23s)
|
This is the last time I'm going to tell you this.
Your #include line in your program refers to 12509.h.
There is no 12509.h file. You have shown that in your post
below. The real filename has an 'F' after the '12'. You have
left this 'F' out. This is a typo or a mistake.
The file you found on your PC, shown below by you, has the 'F' in the middle:
Jordanel wrote: | Header Files
'../../../../../../Program Files/PICC/Devices/12F509.h'
|
Your #include line must have the correct filename in it, as shown below:
Code: | #include c:\Program Files\PICC\devices\12F509.h" |
|
Ok thank you I didnt notice this mistake in your post before!
As for the compiler its CCS 5.xx something.... CCS2 is the name of the Project. MPLAB in no way includes a free CCS compiler, they offer you to download a demo from their website.
Virtual Machine reffers to Oracle Virtualbox. Host OS is Ubuntu, guest OS is Windows 7.
Thanks everyone for the replies! If you have any ideas about the other thread I have how to use CCS in Linux or Ubuntu, please reply there also. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9255 Location: Greensville,Ontario
|
|
Posted: Sun Apr 03, 2016 9:41 am |
|
|
The EASY, SIMPLE, FREE way to get CCS to run is to get a PC and dump W98 or XP onto it ! Nobody wants a 2 year old tower, so I get them for free.
I'm currently running a 12 year old PC, XP home and ZERO problems with CCS or MPLAB. This PC is my 'stand alone enginerring' unit, no access to web, NOT needed, though add the Enet cable and it will work.
The point is that it is a very 'lean and clean' setup. NONE of the problems I've seen with others here about 'permissions', cross platform issues, etc.
If you buy a KVM unit you don't need 2 monitors/kbd/mice !
Also I have REAL 'RS232' comports.....
Options, always think of options !
Jay |
|
|
Jordanel
Joined: 26 Mar 2016 Posts: 17
|
Thank you the advice is good |
Posted: Sun Apr 03, 2016 10:13 am |
|
|
Thank you the advice is good, but not possible. First I'm not in my own country, second nothing is free where I live. Plus I'm in a room provided by the company at the moment, I cant take it with me when I leave!
I appreciate you guiding me through the first MPLAB
steps, I tried some online videos but it didn't work. Thanks to everyone!
CLEAN SUCCESSFUL (total time: 310ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2'
make -f nbproject/Makefile-default.mk dist/default/production/CCS2.production.hex
make[2]: Entering directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2'
gnumkdir -p build/default/production
gnumkdir -p dist/default/production
"C:\PROGRA~1\PICC\CCSCON.exe" out="build/default/production" CCS2.c +FB +DF +CC +Y=9 +EA +DF +LN +T +A +M +J +EA +Z -P #__12F509=1
C:\Users\Jordanel\Documents\CCS C Projects\CCS2\CCS2.c:31:1: Warning#203 Condition always TRUE
Memory usage: ROM=7% RAM=32% - 32%
0 Errors, 1 Warnings.
Build Successful.
gnumkdir -p dist/default/production
make[2]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2'
make[1]: Leaving directory 'C:/Users/Jordanel/Documents/CCS C Projects/CCS2'
BUILD SUCCESSFUL (total time: 2s) |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19568
|
|
Posted: Sun Apr 03, 2016 10:48 am |
|
|
Actually, MPLAB, _did_ include a free CCS compiler. It was about five years ago, and was PCB (only did the PIC12's). Point was it was a complete working package, and for the chip you have would get you working.... |
|
|
|