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

code banking questions

Here an excerpt of an M51 file successfully generated by UV2 version 2.4a. I have "Code Banking" unchecked in the Options..Target tab, "use linker control file" checked in Options...BL51 Misc. The excerpted command at the top of the .M51 file shows my intentions. Why doesn't BL51 put the code where I want it to go? I know that this code won't run as is, but I'm now simply trying to get control over where the code is placed.

BL51 BANKED LINKER/LOCATER V5.11                                                        10/26/2007  16:15:40  PAGE 1


BL51 BANKED LINKER/LOCATER V5.11, INVOKED BY:
C:\KEIL\C51\BIN\BL51.EXE System.obj, ACalib.obj, AFocus.obj, BUTTONS.obj, CMD_HL.obj, CMD_HL_DATA.obj, cmd_hlwc.obj, Cmd
...
>> GE_ME REGFILE (.\CHANGE_ME.ORC)
RAMSIZE (256) DISABLEWARNING (16)
BANKAREA (0X8000, 0XFFFF)

CODE (0X0C00, ?C_C51STARTUP, ?PR?_SET_ERROR?ERROR,
..._SET_TIME_FLAG?TIME)

BANK2 (8000H, ?PR?_ZERO_AXIS?ACALIB, ?CO?ACALIB, ?PR?_SET_FEEDBACK_BY_SPEED?ACALIB, ?PR?_SET_FEE
...

BANK3 (8000H, ?PR?_GET_TOKEN_STRUCT?CMD_HL, ?PR?_H_CMD_PROC?CMD_HL, ?PR?DO_AXIS_VAR_OUTPUT?CMD_HL, ?PR?CMD_HL,
...
...PR?_GETKEY?_GETKEY)

...

MEMORY MODEL: LARGE WITH FLOATING POINT ARITHMETIC

...


INPUT MODULES INCLUDED:
  System.obj (SYSTEM)
  ACalib.obj (ACALIB)
  AFocus.obj (AFOCUS)
  ...

            * * * * * * *   C O D E   M E M O R Y   * * * * * * *
            CODE    0000H     0003H     ABSOLUTE
            CODE    0003H     0003H     ABSOLUTE
                    0006H     0005H                  *** GAP ***
            ...

            CODE    008BH     0003H     ABSOLUTE
                    008EH     0005H                  *** GAP ***
            CODE    0093H     0003H     ABSOLUTE
                    0096H     000DH                  *** GAP ***
            CODE    00A3H     0003H     ABSOLUTE
            CODE    00A6H     009AH     UNIT         ?C_C51STARTUP
            CODE    0140H     0059H     UNIT         ?PR?_SET_ERROR?ERROR...
            CODE    D488H     0001H     UNIT         ?PR?SHUTDOWN_TEST?SHUTDOWN
        ...
            CODE    D489H     0001H     UNIT         ?PR?TIME_TEST?TIME

            * * * * * * *   C O D E   B A N K   2   * * * * * * *
                    0000H     1475H                  *** GAP ***
            BANK2   1475H     0307H     UNIT         ?PR?_ZERO_AXIS?ACALIB
            BANK2   177CH     0243H     UNIT         ?CO?ACALIB
            BANK2   19BFH     023BH     UNIT         ?PR?_SET_FEEDBACK_BY_SPEED?ACALIB
            ...
        BANK2   2700H     0001H     UNIT         ?PR?HANDLE_ZERO_HOME_PRESS?BUTTONS
            BANK2   2701H     000FH     UNIT         ?PR?_CABS?CABS

            * * * * * * *   C O D E   B A N K   3   * * * * * * *
                    0000H     1475H                  *** GAP ***
            BANK3   1475H     03BDH     UNIT         ?PR?_GET_TOKEN_STRUCT?CMD_HL
            BANK3   1832H     01CAH     UNIT         ?PR?_H_CMD_PROC?CMD_HL
        ...
            BANK3   949AH     0008H     UNIT         ?PR?GETCHAR?UNGETCHAR
            BANK3   94A2H     000AH     UNIT         ?PR?_GETKEY?_GETKEY
...

_STRRCHR . . . . . . . . . . . . . @0xf7f0
_SUPPORTED . . . . . . . . . . . . @0xff83
_WAIT_NS . . . . . . . . . . . . . @0xff8c

*** WARNING L19: COMMON CODE SEGMENTS LOCATED TO BANKED AREA

Program Size: data=39.6 xdata=5337 code=59067
LINK/LOCATE RUN COMPLETE.  1 WARNING(S),  0 ERROR(S)

Parents
  • Yes, I did turn off the code banking checkbox because when it was on, BL51 puts code in the banks I specified by selecting each file and using the dropdown list in the options dialog. With the box unchecked, it follows the .lin file I created and saved.

    The excerpted M51 file I posted shows the BL51 command echoing my input file correctly, but executing it incorrectly. When code banking is checked, the M51 file shows UV2 doing its own thing and not using my .lin file.

    Now I need to know if there is a way to make BL51 actually execute my command as written, which it is not doing. It is placing the code according to some scheme other than what's in my .lin file. For example, I want code to start in BANK2 0x8000. It is not doing that.

Reply
  • Yes, I did turn off the code banking checkbox because when it was on, BL51 puts code in the banks I specified by selecting each file and using the dropdown list in the options dialog. With the box unchecked, it follows the .lin file I created and saved.

    The excerpted M51 file I posted shows the BL51 command echoing my input file correctly, but executing it incorrectly. When code banking is checked, the M51 file shows UV2 doing its own thing and not using my .lin file.

    Now I need to know if there is a way to make BL51 actually execute my command as written, which it is not doing. It is placing the code according to some scheme other than what's in my .lin file. For example, I want code to start in BANK2 0x8000. It is not doing that.

Children