| ??? 04/26/00 19:28 Read: times |
#2355 - RE: Hex File Join |
No such simple solution would not do. Let's take an example.
We need 128 kB code space for our application. We make a banking aplication using Keil C51 compiler with the following memory layout: 0x0000-0x7fff - common code area 0x8000-0xffff - banking code memory Our system consists of 32kBytes common area and 3 banks with 32 kBytes each. We put all most frequently used functions and interrupt functions into the common area and all others into the banks. We can take 2 EPROM devices for the code - one 27c256 for the common area code and one 27c010 for the code banks or just one big device covering all code memory. An 27c020 - 256kBytes device would do. We need to duplicate the common memory area in the range from 0x0000-0x7fff into all three 64kB device banks following with the bank code from 0x8000-0xffff. You see that the 3 code banks occupy the same memory region from 0x8000-0xffff so simple removing the last line from the HEX file would cause code overlaying. What to do depends on the memory layout and on the code memory device(s) you are going to use. For our example we would do the following: 1. if using 2 EPROMS: - program the common code EPROM with common code - load bank 0 hex file and program region 0x00000-0x07fff of 27c010 - load bank 1 hex file and program region 0x08000-0x0ffff of 27c010 - load bank 2 hex file and program region 0x10000-0x17ffff of 27c010 2. if using only one 27c020 EPROM: - load the common code and program regions 0x00000-0x07fff, 0x10000-0x17fff, 0x20000-0x27fff all 3 regions with the same code - load bank 0 hex file and program region 0x08000-0x0ffff - load bank 1 hex file and program region 0x18000-0x1ffff - load bank 2 hex file and program region 0x28000-0x2ffff Use 2 port P1 pins for the bank switching - connect to A16 and A17 address inputs of 27c020. That's all. |
| Topic | Author | Date |
| Hex File Join | 01/01/70 00:00 | |
| RE: Hex File Join | 01/01/70 00:00 | |
| RE: Hex File Join | 01/01/70 00:00 | |
| RE: Hex File Join | 01/01/70 00:00 | |
RE: Hex File Join | 01/01/70 00:00 |



