code banking in keil

Hi all!

About "code banking" using keil compiler, I read first 32k memory of bank is kept as common area and rest 32k for bank in each bank. Can we reduce common area memory and increase actual bank memory as per the requirement?

Best regards, Ishita

Reply to
ishita
Loading thread data ...

In article , ishita writes

It is fully explained in the manuals.

Ask Grant Edwards... he like answering this sort of question.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/ chris@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

No manual available?

Meindert

Reply to
Meindert Sprang

Where is the manual?

Kees

Reply to
<->

C51: CREATING CODE BANKING PROGRAMS

formatting link
'For example, if you specify that the bank area is from 0x4000 to

0xFFFF, that gives 48K for the code banks and only 16K for the common area (0x0000 to 0x3FFF).'

BL51 Code-banking Linker/Locator

formatting link

BL51: WRITING YOUR OWN CODE BANKING SYSTEM

formatting link

The answer must be in there somewhere.

Reply to
sivadnz

Hi! Thankyou for timely suggetion. This helped me a lot. Best regards, Aparna

sivadnz wrote:

Reply to
ishita

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

Reply to
ishita

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

Regards Alec

Reply to
sivadnz

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:

Reply to
ishita

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.