I got this error when linking with uVision version 1.24 (using <2Kb memory model): ERROR L121: IMPROPER FIXUP MODULE: SIO.obj (SIO) SEGMENT: ABSOLUTE OFFSET: 0023H And I fixed the error by disabling "Enable variable overlaying" option in "Linking" tab of "BL51 Code Banking Linker" (Options menu). Could anybody tell me where is this option in the latest version (uVision2 2.30), to fix the same error I have found when upgrading to the new IDE version? Thanks.
I don't think this option exists on its own any more. If you select optimisation level 2 or higher in the 'C51' tab of the 'Options for target' dialog then DATA space overlaying will be enabled. I don't know why this should fix your 'Improper fixup' error though. Stefan
The improper fixup error occurs because his code is using more than 256 bytes of data. Overlaying data space reduces data space usage and corrects the bug. I have seen this error pop up when a function is no longer called but is still in the code. The compiler creates a pointer in data space to the uncalled function, I think to support bank switching. If you are using all or most of your data (or idata) space, then don't allow any uncalled functions to remain in your code. This happens to me mostly while debugging code when I temporarily comment out the only place a function is being call from. Phil
You may actually want to fix the problem than simply rely on a side-effect of a compile switch. The error message you receive:
ERROR L121: IMPROPER FIXUP MODULE: SIO.obj (SIO) SEGMENT: ABSOLUTE OFFSET: 0023H