View previous topic :: View next topic |
Author |
Message |
MarkRHolbrook
Joined: 25 Oct 2013 Posts: 2
|
EXPORT requires IDE |
Posted: Fri Oct 25, 2013 2:54 pm |
|
|
Hi,
I am using Proteus V8.1 VSM to simulate some microcontroller work I'm under contract for. We've purchased the PCH command line compiler and I'm working on a simple simulation for PIC18F4550. I just wanted to make sure the compiler was installed and running correctly so I tried to build just the starter file in the proteus environment:
Code: |
/* Main.c file generated by New Project wizard
*
* Created: Fri Oct 25 2013
* Processor: PIC18F4450
* Compiler: CCS for PIC
*/
#include <18F4450.h>
int main (void)
{
// Write your code here
while (1)
;
return 0;
}
|
The command line and error generated is:
ccsc.exe -J +DF +ES -P -Z +O8 +CC +EXPORT +FH "main.c"
make: *** [main.o] Error 1
Error code 2
*** Error 7 "C:\Program Files (x86)\PICC\devices\18F4450.h" Line 36(9,15): Invalid Pre-Processor directive Export requires IDE
1 Errors, 0 Warnings.
Build Failed.
I'm not understanding why this build would fail inside of a device file.
[/code] |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Fri Oct 25, 2013 3:07 pm |
|
|
Quick comments...
First you must understand that Proteus is NOT well liked here!! It's full of bugs,errors and faulty DRCs.NOT worth using in my opinion, best to use real PICs and test in the real World.
Second...
return 0;
This line of code makes no sense. Just where would MAIN return 0 to?
Others will know about EXPORT....I've never knowingly used it in the past 15 years.
hth
jay |
|
|
MarkRHolbrook
Joined: 25 Oct 2013 Posts: 2
|
|
Posted: Fri Oct 25, 2013 3:19 pm |
|
|
Thanks for the reply temtronic.
Proteus is used for ideas only. I have PICs and demo boards.
As far as the return 0, agreed it is a nonsense statement but a valid one. IE it is legal is most dialects of C to have main return and integer value. But yes in a PIC you are absolutely right... why would it return and to what to...
Also is the observation that while(1); is endless so the return would never be reached.
All that my friend is beside the point. Regardless of whether Proteus is liked or the return 0 exists or does not my paid for and purchased copy of command line PCH seems to fail and I cannot find any documentation on why EXPORT would require the IDE only.
I did try removing it from the command line compile and I get a linker error of some kind.
I started using CCS back in 2001. Had issues then and struggled. I even have PIC code with comments like:
/* Following line gives a compile error */
/* ... some commented out valid piece of code like: c = c + 1; */
It seems 12 years later that CCS is still problematic.
Hopefully someone will give me direction on the command line parms which seem to be ill documented as well.
Thanks for the reply. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
|
Posted: Fri Oct 25, 2013 3:46 pm |
|
|
Note from CCS Web site:
http://www.ccsinfo.com/faq.php?page=multi_comp_units
Quote: | In order to create a project using multiple compilation units, one of
the following IDE versions of the CCS C Compiler needs to be used: PCW,
PCWH, PCWHD, PCDIDE. |
Apparently PCH command line version is not supported for multiple
compilation units. The PCWH (IDE version) is required. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
|