SW500011 Microchip Technology, SW500011 Datasheet - Page 95

HI-TECH X PRO FOR PIC32

SW500011

Manufacturer Part Number
SW500011
Description
HI-TECH X PRO FOR PIC32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheet

Specifications of SW500011

No. Of User Licenses
1
Supported Families
PIC32
Core Architecture
PIC
Supported Hosts
Windows XP, Vista, Linux, Mac OS X
Software Edition
Professional
Kit Contents
Software And Docs
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
032
778-1007
778-1007
C Language Features
3.10.4.2 Undefined Symbols
Variables can be defined in assembly code if required, but in some instances it is easier to do so in
C source code, in other cases, the symbols may need to be accessable from both assembly and C
source code.
the entire the C program. In this case, the code generator may remove the variable believing it is
unused. If assembly code is relying on this definition an error will result.
derived object files for symbols which are undefined. These will typically be symbols that are used,
but not defined, in assembly code. The code generator is informed of these symbols, and if they
are encountered in the C code the variable is automatically marked as being volatile. This is the
equivalent of the programmer having qualified the variable as being volatile in the source code,
see Section 3.3.9. Variables qualified as volatile will never be removed by the code generator,
even if they appear to be unused throughout the program.
A problem can occur if there is a variable defined in C code, but is never referenced throughout
To work around this issue, HI-TECH C PRO for the PIC32 MCU Family also searches assembly-
T
P
be located at address 210h in the data space. The assembly file contains:
PSECT lkuptbl,class=RAM,space=1,abs,ovlrd
ORG 210h
lookup:
ds 20h
When the project is compiled, this file is assembled and the resulting relocatable object
file scanned for absolute psects. As this psect is flagged as being abs and ovlrd, the
bounds and space of the psect will be noted — in this case a memory range from address
210h to 22fh in memory space 1 is being used. This information is passed to the code
generator to ensure that these address spaces are not used by C code. The linker will
also be told to remove these ranges from those available, and this reservation will be
observable in the map file. The RAM class definition, for example, may look like:
-ARAM=00h-0FFhx2,0200h-020Fh,0230h-02FFh,0300h-03FFhx3
for an 18F452 device, showing that addresses 210h through 22F were reserved from this
class range.
T
P
as follows:
UT RIAL
UT RIAL
ROCESSING OF ABSOLUTE PSECTS
ROCESSING OF UNDEFINED SYMBOLS
An assembly code files defines a table that must
A C source module defines a global variable
Mixing C and Assembly Code
95

Related parts for SW500011