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

Want to place common code in bank 0.

I want to run the program from microcontroller and External ROM at a time. It works properly. But i program both microcontroller and ROM whenever i change my program. I have placed some of my code in bank 0 and some in common area. My bank 0 starts from the starting location of my ROM and common area is in microcontroller.
My problem is that i dont want to place common area in microcontroller and want to place common area in Bank0 Which is in external ROM.
Can any body help me to place common area in bank 0?

  • At a minimum, you must have the reset vectors, interrupt vectors, and the banking jump table in the common area.

    Other than that, you can put everything else in code banks.

    Jon

  • Thanks for your suggestion. Now i tell you my hardware and software specification.
    My hardware is not an standard hardware. IT contains external RAM, ROM and a Flash memory. The busses are not connected in standard way due to paging mechanism of Flash memory. Therefore to access Flash, my code should be run from inside the microcontroller. The routines which access the flash are written in Assembly language, while other code is written in C using Keil.
    My C-code is much bigger than the internal ROM of the microcontroller 8052. So i must use external ROM.
    But due to flash limitation, I must use both internal and external code memories. I defined code banks in my project in which i assign common area to my Assembly routines
    (by looking the memory map file generated by the compiler) and Bank 0 for rest of the code.
    Every time when i make any change in the c-code which is in bank 0, the common area is also changed. This means every time the linker relocates all of the code including common area and Bank 0.
    This thing increases development time because i have to burn program in microcontroller and ROM. I just want that i put my assembly routines in microcontroller only one time.
    If you please give some of your idea, i will be thankful to you.