Remapping interrupts to RAM

Hello,
I am mapping interrupts to RAM (MEMMAP = 2). I want to overwrite some of the contents of 0x40000000 with my own address (namely, 0x40000008, that is the SWI handler). I know what I want: I need to install a branch instruction like

LDR PC, SWI_Handler


But when I look at address 0x0 (just for an example of how it is done in flash), I see the following repeating pattern:

0x0 18F09FE5
0x4 18F09FE5
0x8 18F09FE5
0xC 18F09FE5

I would expect to find there different instructions!
What gives?

Parents
  • I don't know much about this.

    But I "guess", maybe it is due to that, you do not implement the related xxxx_Handler. So KEIL just simply optimizes them.

    Undef_Handler   B       Undef_Handler
    SWI_Handler     B       SWI_Handler
    PAbt_Handler    B       PAbt_Handler
    DAbt_Handler    B       DAbt_Handler
    IRQ_Handler     B       IRQ_Handler
    FIQ_Handler     B       FIQ_Handler
    

Reply
  • I don't know much about this.

    But I "guess", maybe it is due to that, you do not implement the related xxxx_Handler. So KEIL just simply optimizes them.

    Undef_Handler   B       Undef_Handler
    SWI_Handler     B       SWI_Handler
    PAbt_Handler    B       PAbt_Handler
    DAbt_Handler    B       DAbt_Handler
    IRQ_Handler     B       IRQ_Handler
    FIQ_Handler     B       FIQ_Handler
    

Children
More questions in this forum