Re: code banking in keil



Hi!

Here is the solution to use code banking.
For eg. we want to use 8 code banks.

1. 8 code banks ie memory pages.
2. Steps to achive code banking-
a. Enable code banking in Startup.a51 file.
b. Target options-
i. Select code banking.
ii. Select no. of banks.
iii. Write start & end address of bank area.**********
c. Copy L51_bank.a51 file from LIB and modify as per the hardware.
d. Modifications in L51_bank.a51-
i. ?B_NBANKS = 8 -no. of baks
ii. ?B_MODE = 4 -for user defined switch code.
iii. Modify the switch code for first 4 banks.
iv. Add switch code for remaining 4 banks.
3. If you want to call any function/variable from one bank to other or
from common area to bank or vise-versa, those functions/variables
have
to be imported using keyword "extern".

Best regards,
Ishita


sivadnz wrote:
ishita wrote:
Hi!
Thankyou for timely suggetion. This helped me a lot.
Best regards,
Ishita

Please share the solution with other readers. Or at least a pointer to
the solution.

Regards Alec

.


Quantcast