SW500010 Microchip Technology, SW500010 Datasheet - Page 114

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Linking Programs
output format.
address used by, and the total sizes of, all the psects which are used by the compiled code.
each memory area of the device. This can be used as a guide to the available space left in the device.
be obtained by using the PICC --SUMMARY=psect option. Generate a map file for the complete
memory specification of the program.
3.12.1 Replacing Library Modules
Although HI-TECH C comes with a librarian (LIBR) which allows you to unpack a library files and
replace modules with your own modified versions, you can easily replace a library module that is
linked into your program without having to do this. If you add the source file which contains the
library routine you wish to replace on the command-line list of source files then the routine will
replace the routine in the library file with the same name.
a symbol (in this instance a function name) the linker first scans all source modules for the definition.
Only if it cannot resolve the symbol in these files does it then search the library files. Even though
the symbol may be defined in a source file and a library file, the linker will not search the libraries
and no multiply defined symbol error will result. This is not true if a symbol is defined twice in
source files.
the file max.c in the SOURCES directory, you could make a copy of this source file, make the
appropriate changes and then compile and use it as follows.
The code for max() in max.c will be linked into the program rather than the max() function
contained in the standard libraries. Note, that if you replace an assembler module, you may need the
-P option to preprocess assembler files as the library assembler files often contain C preprocessor
directives.
3.12.2 Signature Checking
The compiler automatically produces signatures for all functions. A signature is a 16-bit value
computed from a combination of the function’s return data type, the number of its parameters and
other information affecting the calling sequence for the function. This signature is output in the
object code of any function referencing or defining the function.
114
HI-TECH C, by default, generates Intel HEX. Use the --OUTPUT= option to specify a different
After linking, the compiler will automatically generate a memory usage map which shows the
The program statistics shown after the summary provides more concise information based on
More detailed memory usage information, listed in ascending order of individual psects, may
This method works due to the way the linker scans source and library file. When trying to resolve
For example, if you wished to make changes to the library function max() which resides in
PICC --chip=16F877A main.c init.c max.c
C Language Features

Related parts for SW500010