I'm working with a code-banking project. The configuration of the hardware is a 32k microcontroller and a 512K external flash divided in 16 banks. My idea is to use the 32K of the microcontroller as dedicated Common area. This way, the Common Code would not be duplicated in each bank of the external flash. I configure my uVision project defining to use On-Chip ROM (0x0-0x7FFF), Off-Chip code memory (start in 0x8000 and size 0x8000) and 16 banks starting in 0x8000 and ending in 0xFFFF. My problem is that in the output the Common area is always duplicated in each bank of the external bank. I can't generate the HEX386 output with only Common code in dedicated internal ROM (On-Chip ROM). Can anybody tell me if I'm forgetting anything ? Is it possible to generate the output without duplicating the Common Code in each bank ? Many thanks in advance, Aitor
Does the Merge32K option in the Output tab produce the results that you want? http://www.keil.com/support/docs/2349.htm
Thanks, using the Merge32K option it doesn't repeat the common area. One question about the Merge32K option: I have another configuration: 32K of On-Chip ROM and an external flash divided in 128 banks (4K each bank). Using the LX51 linker I only can use 64 banks. I configure my uVision project defining to use On-Chip ROM (0x0-0x7FFF), Off-Chip code memory (start in 0x8000 and size 0x8FFF) and a maximum of 32 banks starting in 0x8000 and ending in 0x8FFF. I choose to use 32 banks because if I use 64 it assigns by default each file to the banks. I'm having problems to generate a correct hex output with 4K banks, and the project is based on the project with 32K external flash banks which already works already works. There is any limitation to work with 4K banks?