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

Bank For Constant

Hi all

I ve created a bank for constant using

?B_CB           EQU  3

in the file L51IBANK.A51

and also put some modules to the same bank and I decide now to changing bank to these modules, and when I do this I receive a lot of IMPROPER FIXE-UP error and I see that there is enough place for these modules at the target bank.

Any idea

  • IMPROPER FIXUP errors indicate that the linker needs to access something that is inaccessible (mainly because there is no addressing mode supported in the instruction set). For example, an AJMP to an address that is too far away (more than 11 bits of address space).

    It may be that in moving your constants around, you have located a jump table for a switch statement too far away from the switch code for it to work. Or, worse, you have located the jump table in a different code bank.

    Jon

  • I've just started to use LX51 extended linker, when I try to creat an application consisting 4 banks with bankarea 0x0200-0x0400
    altough "COMMON AREA" bigger than 0x0200H byte My project built succesfully.
    

    How can this be possible?

  • I've just started to use LX51 extended linker, when I try to creat an application consisting 4 banks with bankarea 0x0200-0x0400
    altough "COMMON AREA" bigger than 0x0200H byte My project built succesfully.
    

    How can this be possible?

  • when I try to creat an application consisting 4 banks with bankarea 0x0200-0x0400 altough "COMMON AREA" bigger than 0x0200H byte My project built succesfully

    If you check the linker MAP file, you'll find that the linker duplicated the excess common area in each of the code banks.

    Jon

    Note: It's not a good idea to put your text in a pre block since those kinds of blocks preserve formatting, don't wrap text, and don't insert line breaks. That's why your post is so wide.

  • * * * * * * * * * * *   C O D E   M E M O R Y   * * * * * * * * * * * * *
    
    ***   CODE BANK 0   ***
    000700H   00070BH   00000CH   BYTE   UNIT     CODE/B0        ?PR?FUNC0?C_BANK0
    00070CH   00070CH   000001H   BYTE   UNIT     CODE/B0        ?PR?INTRP0?C_BANK0
    
    ***   CODE BANK 1   ***
    000700H   00070BH   00000CH   BYTE   UNIT     CODE/B1        ?PR?FUNC1?C_BANK1
    00070CH   00070CH   000001H   BYTE   UNIT     CODE/B1        ?PR?INTRP1?C_BANK1
    
    ***   CODE BANK 2   ***
    000700H   000708H   000009H   BYTE   UNIT     CODE/B2        ?PR?FUNC2?C_BANK2
    
    ***   CODE BANK 3   ***
    000700H   000762H   000063H   BYTE   UNIT     CODE/B3        ?CO?C_ROOT
    000763H   0007A1H   00003FH   BYTE   UNIT     CODE/B3        ?CO?C_BANK1
    0007A2H   0007DFH   00003EH   BYTE   UNIT     CODE/B3        ?CO?C_BANK0
    0007E0H   00080EH   00002FH   BYTE   UNIT     CODE/B3        ?CO?C_BANK2
    
    ***   COMMON AREA   ***
    000000H   000002H   000003H   ---    OFFS..   CODE           ?CO?L51IBANK?3
    000003H   000005H   000003H   BYTE   OFFS..   CODE           ?C_BANK0?00003
    000006H   00000AH   000005H   ---    ---      **GAP**
    00000BH   00000DH   000003H   BYTE   OFFS..   CODE           ?C_BANK1?0000B
    00000EH   000372H   000365H   BYTE   UNIT     CODE           ?PR?PRINTF?PRINTF
    000373H   000412H   0000A0H   BYTE   UNIT     CODE           ?C_C51STARTUP
    000413H   0004B0H   00009EH   BYTE   UNIT     CODE           ?C?LIB_CODE
    0004B1H   0004D7H   000027H   BYTE   UNIT     CODE           ?PR?PUTCHAR?PUTCHAR
    0004D8H   0004F0H   000019H   BYTE   UNIT     CODE           ?C_INITSEG
    0004F1H   000508H   000018H   BYTE   UNIT     CODE           ?BANK?SELECT
    000509H   00052AH   000022H   BYTE   UNIT     CODE           ?PR?MAIN?C_ROOT
    

    with bank area 0x0700 - 0x1000

    * * * * * * * * * * *   C O D E   M E M O R Y   * * * * * * * * * * * * *
    
    ***   CODE BANK 0   ***
    000500H   00050BH   00000CH   BYTE   UNIT     CODE/B0        ?PR?FUNC0?C_BANK0
    00050CH   00050CH   000001H   BYTE   UNIT     CODE/B0        ?PR?INTRP0?C_BANK0
    
    ***   CODE BANK 1   ***
    000500H   00050BH   00000CH   BYTE   UNIT     CODE/B1        ?PR?FUNC1?C_BANK1
    00050CH   00050CH   000001H   BYTE   UNIT     CODE/B1        ?PR?INTRP1?C_BANK1
    
    ***   CODE BANK 2   ***
    000500H   000508H   000009H   BYTE   UNIT     CODE/B2        ?PR?FUNC2?C_BANK2
    
    ***   CODE BANK 3   ***
    000500H   000562H   000063H   BYTE   UNIT     CODE/B3        ?CO?C_ROOT
    000563H   0005A1H   00003FH   BYTE   UNIT     CODE/B3        ?CO?C_BANK1
    0005A2H   0005DFH   00003EH   BYTE   UNIT     CODE/B3        ?CO?C_BANK0
    0005E0H   00060EH   00002FH   BYTE   UNIT     CODE/B3        ?CO?C_BANK2
    
    ***   COMMON AREA   ***
    000000H   000002H   000003H   ---    OFFS..   CODE           ?CO?L51IBANK?3
    000003H   000005H   000003H   BYTE   OFFS..   CODE           ?C_BANK0?00003
    000006H   00000AH   000005H   ---    ---      **GAP**
    00000BH   00000DH   000003H   BYTE   OFFS..   CODE           ?C_BANK1?0000B
    00000EH   000372H   000365H   BYTE   UNIT     CODE           ?PR?PRINTF?PRINTF
    000373H   000412H   0000A0H   BYTE   UNIT     CODE           ?C_C51STARTUP
    000413H   0004B0H   00009EH   BYTE   UNIT     CODE           ?C?LIB_CODE
    0004B1H   0004D7H   000027H   BYTE   UNIT     CODE           ?PR?PUTCHAR?PUTCHAR
    0004D8H   0004F0H   000019H   BYTE   UNIT     CODE           ?C_INITSEG
    0004F1H   00060EH   00011EH   ---    ---      **GAP**
    00060FH   000626H   000018H   BYTE   UNIT     CODE           ?BANK?SELECT
    000627H   000648H   000022H   BYTE   UNIT     CODE           ?PR?MAIN?C_ROOT
    
    

    with bank area 0x0500 - 0x1000


    at the first configuration no problem because
    common area enough, but at the second one common area size is smaller than code what I want to put it in. In the latter case I see that ( in the .map file ) linker add the following GAP
    0004F1H 00060EH 00011EH --- --- **GAP**

    every time the COMMON area small than actual code size I remark that compiler add such GAP
    when I increase COMMON area size this GAP disappear.

    Actually Compiler dont duplicate (as seen from .MAP file) excess code part to other bank.

  • Actually Compiler dont duplicate (as seen from .MAP file) excess code part to other bank.

    Actually, it does. It just still calls it COMMON and only lists it in the COMMON AREA.

    These segments...

    00060FH   000626H   000018H   BYTE   UNIT     CODE           ?BANK?SELECT
    000627H   000648H   000022H   BYTE   UNIT     CODE           ?PR?MAIN?C_ROOT
    
    ARE located in the CODE BANK memory.

    Jon