[INTEL NAVIGATION HEADER]

Deciphering RL51's Error Message "Improper Fixup"

(#3233) Deciphering RL51's Error Message "Improper Fixup" [INTEL NAVIGATION HEADER]

Deciphering RL51'S Error Message "IMPROPER FIXUP"

The purpose of this note is to more clearly describe the nature of the RL51 error message 121, "IMPROPER FIXUP". This error will occur when the linker is given or has calculated a PUBLIC relocatable object which is too large for the number of bytes allocated for its EXTERNAL match-up. This generally means an attempt was made to fit an object whose value is greater than 255 into a one-byte operand. Listed below is a sample of ASM code which could produce fixup errors:

LOC OBJ LINE SOURCE
1 extrn code (some_label, some_proc)
2 extrn number (some_const)
3
4 examp_seg segment code
---- 5 rseg examp_seg
6
0000 7400 F 7 mov a,#some_const ; error if some_const > 255
0002 1100 F 8 acall some_proc ; error if some_proc outside
9 ; of current 2k page
0004 0100 F 10 ajmp some_label ; same error as line 8
.....
For example, if the address for "some_proc" will not fit into the fixup location (denoted by "F" in list files), RL51 will produce the following error message:

-ERROR 121: IMPROPER FIXUP
MODULE: SAMPLE.OBJ(SAMPLE)
SEGMENT: EXAMP_SEG
OFFSET: 0002H

where "OFFSET" corresponds to "LOC" indicated in the list file.

PL/M51 can also fall prey to fixup errors if a module is compiled with the ROM switch set to SMALL but calls are made to outside modules which do not fit into the same 2K block. The ROM(SMALL) setting requires that the module being compiled fit into a single 2K chunk and therefore creates no 3-byte CALLS or JMPS. Note that the CODE switch must be set in order to generate address offset values in PL/M51 listings.

Conclusion:
Cross referencing OFFSET values from RL51's error message 121 to ASM51 or PL/M51 list files will allow quick determination of faulty PUBLIC-EXTERNAL assignments.


Legal Stuff © 1997 Intel Corporation

Free Web Hosting



Legal Stuff © 1997 Intel Corporation