View previous topic :: View next topic |
Author |
Message |
susan@notus
Joined: 13 Aug 2020 Posts: 3
|
SOLVED: Invalid option: +EX |
Posted: Thu Aug 13, 2020 8:31 am |
|
|
I am setting up MPLab IDE v5.40 and ccs compiler v4.124 and I can't get my new project to compile.
I created a new project in MPLAB and used existing source and header files (which have been successfully compiled by others but I'm not sure their setup).
Every time I try to build the project I get an error in mplab and an external window from "pic c compiler" pops up saying: "Invalid Option: +EX"
MPLAB seems to be complaining about the make file. See error messages below:
"C:\Program Files (x86)\PICC\CCSC.exe" out=""build/default/production"" main.c +EXPORT +FH +DF +CC +EX +Y=9 +EA +DF +LN +T +A +M +J +Z -P \#__18F46K20=1 +EXPORTD="build/default/production"
nbproject/Makefile-default.mk:199: recipe for target 'build/default/production/transmit.o' failed
make[2]: *** [build/default/production/transmit.o] Error 11
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [build/default/production/pic.o] Error 11
nbproject/Makefile-default.mk:187: recipe for target 'build/default/production/pic.o' failed
make[2]: *** [build/default/production/net_sounder.o] Error 11
nbproject/Makefile-default.mk:175: recipe for target 'build/default/production/net_sounder.o' failed
make[2]: *** [build/default/production/main.o] Error 11
nbproject/Makefile-default.mk:211: recipe for target 'build/default/production/main.o' failed
make[2]: *** [build/default/production/dds.o] Error 11
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:163: recipe for target 'build/default/production/dds.o' failed
make[2]: Leaving directory 'C:/Users/susan/MPLABXProjects/MantisTranspoderRD.X'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/susan/MPLABXProjects/MantisTranspoderRD.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 8s)
I have multiple source files in my build. Is that an issue? I've seen old posts about only being able to have the main file as the source code but I don't know if that still applies...
Any help would be greatly appreciated.
Note: I am running Windows 10 Home 64 bit
Last edited by susan@notus on Fri Aug 14, 2020 6:51 am; edited 1 time in total |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Thu Aug 13, 2020 9:59 am |
|
|
Normally the 'best' way, is to just have the single main project.c file,
and have this #include the rest of the files. The other files are added to
the 'header file' section of the project, and the one main file
is to only one put in the source file section.
It is technically possible to have the files compiled separately (which
means they can then be in the source file section), but they will all
have to be changed to have the main file #import the other files,
and have the other files all #export the functions and variables to
be passed to the main (look at 'multiple compilation units' in the manual.
However the 'traditional' way results in more efficient code, so honestly
use this. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Thu Aug 13, 2020 11:09 am |
|
|
And if you want to include the same .H files into those included .C files without error,
(if no one has mentioned yet)
Make sure to include this in every included H file (or similar)
Code: |
#ifndef _THIS_H_FILE /* (<-- this can be any string. I usually use the filename) */
#define _THIS_H_FILE
... all your .H file stuff
#endif
|
_________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
susan@notus
Joined: 13 Aug 2020 Posts: 3
|
Old Compiler May Be the Issue |
Posted: Thu Aug 13, 2020 11:28 am |
|
|
Thanks for the info on multiple source files. I will read up on it!
Also, I contacted ccs tech support and they got back to me right away.
It turns out this is because I am using an older version of the compiler which doesn't have the +EX feature. So I either need to update my compiler or install an older version of the plugin for MPLAB.
Turns out my company does have a new version of the compiler but hasn't put it on our server yet. So I will install the newer version, test and post again to cofirm it's fixed the problem. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
Re: Old Compiler May Be the Issue |
Posted: Thu Aug 13, 2020 11:49 am |
|
|
susan@notus wrote: | Thanks for the info on multiple source files. I will read up on it!
Also, I contacted ccs tech support and they got back to me right away.
It turns out this is because I am using an older version of the compiler which doesn't have the +EX feature. So I either need to update my compiler or install an older version of the plugin for MPLAB.
Turns out my company does have a new version of the compiler but hasn't put it on our server yet. So I will install the newer version, test and post again to cofirm it's fixed the problem. |
Yea - now that I think about it - I think multiple-compile units started with 5.xxx but it's been a while so someone might have better info.
Let us know..
AND -- make sure to come back and edit your post to say SOLVED in the subject so people see it in a forum search.
Cheers,
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Old Compiler May Be the Issue |
Posted: Thu Aug 13, 2020 12:23 pm |
|
|
susan@notus wrote: | It turns out this is because I am using an older version of the compiler which doesn't have the +EX feature. So I either need to update my compiler or install an older version of the plugin for MPLAB.
|
If that newer version is still too old, then you can install MPLAB vs. 8.92
which is the pre MPLAB X version of MPLAB.
MPLAB vs. 8.92 download (from Microchip website) without having
to sign up and register:
http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_92.zip |
|
|
susan@notus
Joined: 13 Aug 2020 Posts: 3
|
Solved! |
Posted: Fri Aug 14, 2020 6:50 am |
|
|
UPDATE
I installed the current version of ccs and made a new project, placed the existing files in it and was able to compile without any issues. |
|
|
|