|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
Information in this article applies to:
I have discovered that if I change the order of OBJ files in the BL51 linker command line, I sometimes get the following error message:
Error L121: Improper Fixup
Is this a bug in the C51 package or is it an error in my code?
This error message may be caused under the circumstances described if the program was compiled in ROM(SMALL) or ROM(COMPACT). If the program subsequently outgrows the range of the AJMP and ACALL instructions used, the linker generates the FIXUP error.
When the linker cannot resolve the address of a branch instruction, it generates this error. The diagnostic reports the segment and the offset of the offending instruction. To figure out the location of the offending instruction, read the appropriate list file, find the reported function, and scan down the leftmost column for the offset within the segment. When you find the offset, that is the instruction that has the problem.
If it is an AJMP or ACALL, change the ROM model to ROM(LARGE) and re-compile your source files.
If you wrote some or all of your routines in assembly, the FIXUP error may be due to an AJMP or ACALL instruction whose target is out of range. Changing the AJMP/ACALL to LJMP/LCALL may solve the problem.
Article last edited on: 2005-07-19 15:15:20
Did you find this article helpful? Yes No
How can we improve this article?