Hello, my code passes compilation fine when using small or large models. however when changing the project to use compact model, I get the following errors, (which seem like library bugs) (???):
linking... *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (PRINTF) SEGMENT: ?PR?PRINTF?PRINTF OFFSET: 0068H *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 0087H *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 00AFH *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 00C8H *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 00D5H *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 00F0H *** ERROR L121: IMPROPER FIXUP MODULE: C:\KEIL\C51\LIB\C51FPC.LIB (LOG) SEGMENT: ?PR?LOG?LOG OFFSET: 010DH *** APPLICATION REQUIRES RE-TRANSLATIONS! *** Program Size: data=133.7 xdata=1795 code=15338 Target not created
What is the first error that you get from the Linker?
One more thing: when you mix XDATA and PDATA addressing, you need to specify the PDATA directive at linker level and you need to enable the PPAGE setting in the STARTUP.A51 file. Reinhard
I use the DP8051 od DCD (Digital Core Design). I think that a new startup.a51 should be created for them: they use DPP (which is Data Page Pointer) mechanism. the DPP is located according to their include file at address 0x93, while PORT2 is a separate entity that is not related to the memory Page Selection. Should I change the PPAGE_SFR's value from 0A0 to 093 ? Should I enable it at all (after reset the deafult DPP will allways be 0, which suits our design, and to my understanding the startup code will only set it to this value and do nothing else, since I don't want to spend time for the pdata memory initilization to 0 (I didn't change the settings of PDATALEN, and left it to be zero) ? Additionaly, I want to explain that the value of DPP changes along the SW flow frequently. Amit.
Just specify correct SFR address in STARTUP.A51: ------------------ ; <o> SFR address which supplies uppermost address byte <0x0-0xFF> ; most 8051 variants use P2 as uppermost address byte PPAGE_SFR DATA 0A0H ----------------- Reinhard
Reinhard, After setting the PDATA directive in the Keil project configuration -> "BL51 locate" page the errors messages disapeared. I would still like to get the answer regarding the STARTUP.A51 settings. Thanks, Amit A.
OK, Thanks.