ARM Technical Support Knowledge Articles

WRITING YOUR OWN CODE BANKING SYSTEM

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

How can I configure the linker so that it locates functions in different code banks but does not implement code banking? The reason is because I want to write my own code banking system.

ANSWER

You may use the code below as a dummy L51_BANK.A51 file as it contains the bare minimum for the linker to link a code banking project. Add this file to your project. You may then write whatever code you require or develop whatever system you need to implement your own code banking.

$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-08-03 15:26:23

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