Keil Logo

BL51: WARNING 20 (NBANKS LESS THAN # OF CODE BANKS), PT 2


Information in this article applies to:

  • C51 Version 5.50

SYMPTOMS

I have a project which uses code banking and I have modified the L51_BANK.A51 file. I get the following error when I link my project:

*** WARNING L20: L51_BANK.A51: NBANKS < NUMBER OF CODE BANKS
NBANKS:  16
ACTUAL:  229
LINK/LOCATE RUN COMPLETE.  1 WARNING(S),  0 ERROR(S)

This warning is not documented in the 8051 Utilities Manual.

CAUSE

This problem can be caused by necessary information having been removed from the L51_BANK.A51 file.

RESOLUTION

Check that ?B_NBANKS is declared as PUBLIC in your modified L51_BANK.A51 file.

Below is a L51_BANK.A51 file that contains the minimum information that is required for code banking. This can be used to check your own L51_BANK.A51 file, or as a starting point. Note however that modified L51_BANK.A51 files are not supported by Keil Software.

$NOCOND DEBUGPUBLICS
;------------------------------------------------------------------------------
;  This file disables the bank switching of the BL51 Banked Linker/Locater
;  and allows code banking with own user routines.
;------------------------------------------------------------------------------
;************************ Configuration Section *******************************
?B_NBANKS       EQU     16       ; Define max. Number of Banks                *
;                                ; the max. value for ?B_BANKS is 32          *
;                                                                             *
; Dummy Definitions
; -----------------
                NAME    ?BANK?SWITCHING

?BANK?SELECT    SEGMENT  CODE
                RSEG    ?BANK?SELECT
?B_BANK0:       CLR     A
                JMP     @A+DPTR

?B_MODE         EQU     0

                PUBLIC  ?B_NBANKS, ?B_MODE, ?B_BANK0

                END

MORE INFORMATION

SEE ALSO

Last Reviewed: Tuesday, July 19, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.