This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"improper fixup" linking error caused by load and store library routines?

Hi,

It seems as if the load and store library routines used by the C51 compiler (see http://www.keil.com/support/docs/1964.htm for a description of these routines) are the cause of an 'improper fixup' error I'm getting while linking. I'm using the ROM(SMALL) directive in conjunction with a customized linker command line:

CODE(?CO?StateTest(0x4005), ?PR?*) OVERLAY(* ! ?PR?_UPDATE?StateTest, * ! ?CO StateTest)

to link the following small program:
=============================================
#pragma ROM(SMALL)

unsigned int update(unsigned int arg0, unsigned int arg1);

typedef struct ProcessFragmentState {
unsigned int x;
unsigned char a;
} PFragState;

unsigned int code StateSize = sizeof(PFragState);

PFragState xdata * statePtr;

unsigned int update(unsigned int arg0, unsigned int arg1) {
(statePtr -> x) = (statePtr -> x) + 1;
return arg0 + arg1;
}

=============================================

Shouldn't the linker be able to figure out where to place the load and store routines such that they satisfy the ROM(SMALL) requirements? Is there a way around this?

Thanks,
Slarti