11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DSPICC Compiler OptionsDSPICC Command-line Driver#define macro textwhere text is the textual substitution required. Thus, the command:DSPICC --CHIP=30F6014 -Ddebug -Dbuffers=10 test.cwill compile test.c with macros defined exactly as if the C source code had included the directives:#define debug 1#define buffers 102.4.4 -Efile: Redirect Compiler Errors to a FileSome editors do not allow the standard command line redirection facilities to be used when invokingthe compiler. To work with these editors, DSPICC allows an error listing filename to be specifiedas part of the -E option. Error files generated using this option will always be in -E format. Forexample, to compile x.c and redirect all errors to x.err, use the command:DSPICC --CHIP=30F6014 -Ex.err x.cThe -E option also allows errors to be appended to an existing file by specifying an addition character,+, at the start of the error filename, for example:DSPICC --CHIP=30F6014 -E+x.err y.cIf you wish to compile several files and combine all of the errors generated into a single text file, usethe -E option to create the file then use -E+ when compiling all the other source files. For example,to compile a number of files with all errors combined into a file called project.err, you could usethe -E option as follows:DSPICC --CHIP=30F6014 -Eproject.err -O -C main.cDSPICC --CHIP=30F6014 -E+project.err -O -C part1.cDSPICC --CHIP=30F6014 -E+project.err -C asmcode.asThe file project.err will contain any errors from main.c, followed by the errors from part1.cand then asmcode.as, for example:main.c 11 22: ) expectedmain.c 63 0: ; expectedpart1.c 5 0: type redeclaredpart1.c 5 0: argument list conflicts with prototypeasmcode.as 14 0: Syntax errorasmcode.as 355 0: Undefined symbol _putint8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!