We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I try to use 128K Flash memory of 89C51RE2 and its memory layout as the following:
0x0000 - 0xFFFF (common area) 0x10000 - 0x17FFF (bank 1) 0x18000 - 0x1FFFF (bank 2)
I am using BL51 and OC51 to generate B01, B02, B03 files...
I look at the memory location 0x10000, I saw common codes start from 0x10000. How do I disable common code place into bank1 area?
Best regards, Thomas.
The hex files for banked code are a little odd. Every bank takes up 64KB, with the common code repeated in the bottom 32KB. This kind of hex file is used for hardware that does 64KB banks.
See the MERGE32K directive for OHX51. This "packs" the code so that the common bank is the bottom 32K, with each other bank following, which is probably the layout you expect.