|
|||||||||||
Technical Support Support Resources
Product Information |
BL51: Error 121 (Improper Fixup)QUESTIONI have a FIXUP error when I link my program.
I have reduced my program to the following:
What's wrong? ANSWERThe above code appears as though it should work, but when you link it, the FIXUP error is generated. To find where the error occurs, check the OFFSET in the error message. In this case it is 0022 (Hex) in the J1.C file. If you look at the .LST file, you will see the following at this offset:
Offset 0022 is where the compiler tries to calculate the offset of the status array minus the 261 that was used in the index.
The problem with this is that status is an array in idata which is limited to 256 bytes in total space. Since the -261 is larger than a byte, the compiler/linker cannot resolve the address because the computed offset is 16-bits but the MOV instruction generated only allows for a byte. To solve this problem requires a little creative type casting. The following code change solves the problem and generates the desired results:
MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.