ARM Technical Support Knowledge Articles

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

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


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

Article last edited on: 2005-07-19 15:18:26

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential