|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
For our application, we need to locate romcode (flash) at offset 0x8000. We know that there are 3 steps are involved (set CSEG at 0x8000, relocate interrupt vectors with INTVECTOR(0x8000), and specify linker options). We modified the startup.a51 and our project.
We converted the linker output to a binary image and programmed it into FLASH at address 0x8000. When this code ran (started from internal rom), it seems that our external interrupt 0 handler (located at 0x8003) is not called. Instead, the internal rom interrupt handler (located at 0x0003) is called when the interrupt happens. The FLASH code at 0x8003 shows a LJMP to 0x84C3 which is ok.
Is there something tricky we don't see?
When the external interrupt 0 occurs, the 8051 AUTOMATICALLY jumps to address 0x0003. There is nothing you can do to the 8051 MCU to make it jump to 0x8003. You must make a change to the software in your internal ROM. In the internal ROM, you need to place an LJMP 0x8003 at address 0x0003. You can do that with the following short assembly routine.
cseg at 00003h LJMP 08003h end
That should fix it.
Article last edited on: 2004-06-07 10:20:10
Did you find this article helpful? Yes No
How can we improve this article?