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 Command-line DriverDSPICC Compiler Options2.4.5 -Gfile: Generate Source-level Symbol FileThe -G option generates a source-level symbol file (i.e. a file which allows tools to determine whichline of source code is associated with machine code instructions, and determine which source-levelvariable names correspond with areas of memory, etc.) for use with supported debuggers and simulatorssuch as HI-TIDE and MPLAB R○ . If no filename is given, the symbol file will have the same basename as the first source or object file specified on the command line, and an extension of .sym. Forexample the option -GTEST.SYM generates a symbol file called test.sym. Symbol files generatedusing the -G option include source-level information for use with source-level debuggers.Note that all source files for which source-level debugging is required should be compiled withthe -G option. The option is also required at the link stage, if this is performed separately. Forexample:DSPICC --CHIP=30F6014 -G -C test.cDSPICC --CHIP=30F6014 -C module1.cDSPICC --CHIP=30F6014 -Gtest.sym test.obj module1.objwill include source-level debugging information for test.c only because module1.c was not compiledwith the -G option.The --IDE option will typically enable the -G option.2.4.6 -Ipath: Include Search PathUse -I to specify an additional directory to use when searching for header files which have beenincluded using the #include directive. The -I option can be used more than once if multipledirectories are to be searched. The default include directory containing all standard header filesare always searched even if no -I option is present. The default search path is searched after anyuser-specified directories have been searched. For example:DSPICC --CHIP=30F6014 -C -Ic:\include -Id:\myapp\include test.cwill search the directories c:\include and d:\myapp\include for any header files included intothe source code, then search the default include directory which is typically c:\htsoft\<strong>dsPIC</strong>C\include.2.4.7 -Llibrary: Scan LibraryThe -L option is used to specify additional libraries which are to be scanned by the linker. Librariesspecified using the -L option are scanned before the standard C library, allowing additional versionsof standard library functions to be accessed.The argument to -L is a library keyword to which the prefix dspicc- and the suffix .lib areadded. Thus the option -Lmylib will, for example, scan the library dspicc-mylib.lib and the9

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

Saved successfully!

Ooh no, something went wrong!