SW500007 Microchip Technology, SW500007 Datasheet - Page 370

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
Badly written C code can also generate assembler that ultimately generates fixup overflow errors.
Consider the following error message.
This indicates that the file causing the problem was main.obj. This would be typically be the output
of compiling main.c or main.as. This tells you the file in which you should be looking. The next
number (8 in this example) is the record number in the object file that was causing the problem. If
you use the DUMP utility to examine the object file, you can identify the record, however you do not
normally need to do this.
for the value (1) , and the value which is the actual value the symbol represents, is typically the only
information needed to track down the cause of this error. Note that a size which is not a multiple of
8 bits will be rounded up to the nearest byte size, i.e. a 7 bit space in an instruction will be shown as
1 byte.
error message.
and to confirm, look for the symbol referenced in the assembler instruction at this address in the
symbol table at the bottom of the same file.
In this example, the instruction causing the problem takes an 8-bit offset into a bank of memory, but
clearly the address 0x1FC exceeds this size. Maybe the instruction should have been written as:
which masks out the top bits of the address containing the bank information.
bler list file look back up the file from the instruction at fault to determine which C statement has
generated this instruction. You will then need to examine the C code for possible errors. incorrectly
qualified pointers are an common trigger.
356
The causes for this can be many, but hand-written assembler code is always the first suspect.
The location (loc) of the instruction (0x1FD), the size (in bytes) of the field in the instruction
Generate an assembler list file for the appropriate module. Look for the address specified in the
If the assembler instruction that caused this error was generated by the compiler, in the assem-
main.obj: 8: Fixup overflow in expression (loc 0x1FD (0x1FC+1), size 1, value 0x7FC)
7
8
9
Symbol Table
_foo 01FC
movwf (_foo&0ffh)
07FC
07FD
07FE
_main 07FF
0E21 movlw 33
0012 return
6FFC movwf _foo
Fri Aug 12 13:17:37 2004
Error and Warning Messages

Related parts for SW500007