This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

where is the common area in code bank?

Hi,

In most example, if we use "BANKAREA(0x8000,0xFFFF)",the common area will allocate at the 0x0000~0x7FFF of all banks. As the http://www.keil.com/support/docs/158.htm descript.

My question is if I want to use 4*64K code roms(4 bank),and set the bank area to be "BANKAREA(0x0000,0xFFFF)". Where does the common area be located? Bank0?
Can I specify the location of common area before linking?

Thanks!

Best Regards,
Allkeny

  • There are two common kinds of bank switching.

    One kind uses a fixed 32K bank from 0000H..7FFFH. The upper 32K has hardware to map in different regions of physical memory. 256K of memory would give you eight 32K banks to map into that window, one of which will be the same as the common bank.

    The other kind of bank switching swaps out the entire 64K of program space for a different region of physical memory. In this case, the common area is still in low memory, but it has to be replicated into each bank so that it always available.

  • Refer to the following example from the linker manual:

    http://www.keil.com/support/man/docs/lx51/lx51_bk_example1.htm

    It sounds like this is what you want to do.

    Jon