Discussion Forum

Improper fixup problem in library when using compact model

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Amit Alon
Posted
20-Feb-2005 16:43 GMT
Toolset
C51
New! Improper fixup problem in library when using compact model
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

can you please advise ?

Thanks,
Amit Alon.
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 06:48 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
From your email it is unclear how you have located the PDATA memory.

We are not aware of any library bugs. What other errors do you get: you need to start with analysing the first error, and not in the middle of the Linker error list.

See also:
http://www.keil.com/support/docs/2157.htm

Reinhard
Read-Only
Author
Amit Alon
Posted
21-Feb-2005 08:13 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
Reinhard,

I have chosen to use the compact model from the project target options. to my understanding, this causes the compiler to use with pdata area section for all automatic variables and parameters passed to the funcions that can't fit into the free registers.

I have allready read the linked article, and can't use it since i dont know where is the assembler code of library's functions. (I think that it is hidden from me ???).

The errors that where described in this thread are the only errors that exist, and they vanish if I change the project to use small model, or large model. I will send to you by e-mail the full map file with the errors for more information that may help you understand my preblem better.

Thanks,
Amit A.
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 08:20 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
What is the first error that you get from the Linker?
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 08:20 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
What is the first error that you get from the Linker?
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 08:51 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
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
Read-Only
Author
Amit Alon
Posted
21-Feb-2005 09:09 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
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.
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 09:22 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
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
Read-Only
Author
Amit Alon
Posted
21-Feb-2005 09:23 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
OK,
Thanks.
Read-Only
Author
Amit Alon
Posted
21-Feb-2005 09:22 GMT
Toolset
C51
New! RE: Improper fixup problem in library when using compact model
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.

Next Thread | Thread List | Previous Thread Start a Thread | Settings