SW500009 Microchip Technology, SW500009 Datasheet - Page 91

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
3.13 Linking Programs
The compiler will automatically invoke the linker unless requested to stop after producing assembler
code (PICC -S option) or object code (PICC -C option).
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.
obtained by using the PICC --SUMMARY=psect option. Generate a map file for the complete memory
specification of the program.
3.13.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.
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.
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 be
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
The code for max() in max.c will be linked into the program rather than the max() function
Linking Programs
77

Related parts for SW500009