|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
I want to build a project using the 8051. I converted my code from BorlandC to Keil and it compiled OK. However, it didn't link because the total code size came out to about 90K.
I started searching for ways to have a 90K program, however, I can't figure out how to do this. Is there a way to have a 90K program run on the 8051?
Yes. However, you must have bank-switching hardware and you must use the bank switching features of the BL51 code-banking linker.
By default, the 8051 only supports 64K of total code memory. This is due to the 8051's addressing method, which is based on a 16-bit address. Additionally, the 8051 only has 16 address lines (2^16 = 64K).
With bank switching, you can have up to 32 banks of 64K for a total of 2 MegaBytes of code space. Refer to C51: CREATING CODE BANKING PROGRAMS for more details on how to setup the linker for code banking. You may also refer to the code banking examples in the C51EXAMPLES directory of your installation.
Article last edited on: 2004-11-15 14:52:45
Did you find this article helpful? Yes No
How can we improve this article?