ARM Technical Support Knowledge Articles

INTERRUPT VECTOR REDIRECTION

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

I am developing an embedded system that consists of two parts: an Operating System that is located at 000000H, and my application that is located at 280000H. The Operating System is effectively a bootloader and loads in the application.

How can I move my interrupt vector table to 280000H? I tried using the VECTAB directive to move the table to 280000H, however, my processor still vectors to the table at 000000H.

ANSWER

The interrupt vectors are performed in hardware and cannot be changed. However, you may redirect the interrupt vectors to your interrupt vector table at 280000H. Note that you still need to use the VECTAB directive to ensure that your Interrupt Service Routines have vectors in the table at 280000H.

The following example assembler file achieves this and should be included as part of your bootloader project:

$segmented

; this example shows how to redirect interrupt vectors to
; address 28000H.  Interrupt Vector redirection is typically required
; when you devide an user program into two parts:  BOOT part and
; application part.  This assembly module needs to be added to the BOOT
; part that is located in segment 0 of the 166 program space.
;
; The application part needs to be linkedwith the L166 VECTAB directive.
; In this example you need to specify VECTAB(0x28000) to generate the interrupt
; vector table at address 0x28000.

VEC_SEG  EQU 2
VEC_OFF  EQU 8000H

; The RESET vector is used by the boot application
VECT_TAB SECTION CODE AT 4
VEC_PROC PROC
  JMPS VEC_SEG,VEC_OFF+004H
  JMPS VEC_SEG,VEC_OFF+008H
  JMPS VEC_SEG,VEC_OFF+00CH
  JMPS VEC_SEG,VEC_OFF+010H
  JMPS VEC_SEG,VEC_OFF+014H
  JMPS VEC_SEG,VEC_OFF+018H
  JMPS VEC_SEG,VEC_OFF+01CH
  JMPS VEC_SEG,VEC_OFF+020H
  JMPS VEC_SEG,VEC_OFF+024H
  JMPS VEC_SEG,VEC_OFF+028H
  JMPS VEC_SEG,VEC_OFF+02CH
  JMPS VEC_SEG,VEC_OFF+030H
  JMPS VEC_SEG,VEC_OFF+034H
  JMPS VEC_SEG,VEC_OFF+038H
  JMPS VEC_SEG,VEC_OFF+03CH
  JMPS VEC_SEG,VEC_OFF+040H
  JMPS VEC_SEG,VEC_OFF+044H
  JMPS VEC_SEG,VEC_OFF+048H
  JMPS VEC_SEG,VEC_OFF+04CH
  JMPS VEC_SEG,VEC_OFF+050H
  JMPS VEC_SEG,VEC_OFF+054H
  JMPS VEC_SEG,VEC_OFF+058H
  JMPS VEC_SEG,VEC_OFF+05CH
  JMPS VEC_SEG,VEC_OFF+060H
  JMPS VEC_SEG,VEC_OFF+064H
  JMPS VEC_SEG,VEC_OFF+068H
  JMPS VEC_SEG,VEC_OFF+06CH
  JMPS VEC_SEG,VEC_OFF+070H
  JMPS VEC_SEG,VEC_OFF+074H
  JMPS VEC_SEG,VEC_OFF+078H
  JMPS VEC_SEG,VEC_OFF+07CH
  JMPS VEC_SEG,VEC_OFF+080H
  JMPS VEC_SEG,VEC_OFF+084H
  JMPS VEC_SEG,VEC_OFF+088H
  JMPS VEC_SEG,VEC_OFF+08CH
  JMPS VEC_SEG,VEC_OFF+090H
  JMPS VEC_SEG,VEC_OFF+094H
  JMPS VEC_SEG,VEC_OFF+098H
  JMPS VEC_SEG,VEC_OFF+09CH
  JMPS VEC_SEG,VEC_OFF+0A0H
  JMPS VEC_SEG,VEC_OFF+0A4H
  JMPS VEC_SEG,VEC_OFF+0A8H
  JMPS VEC_SEG,VEC_OFF+0ACH
  JMPS VEC_SEG,VEC_OFF+0B0H
  JMPS VEC_SEG,VEC_OFF+0B4H
  JMPS VEC_SEG,VEC_OFF+0B8H
  JMPS VEC_SEG,VEC_OFF+0BCH
  JMPS VEC_SEG,VEC_OFF+0C0H
  JMPS VEC_SEG,VEC_OFF+0C4H
  JMPS VEC_SEG,VEC_OFF+0C8H
  JMPS VEC_SEG,VEC_OFF+0CCH
  JMPS VEC_SEG,VEC_OFF+0D0H
  JMPS VEC_SEG,VEC_OFF+0D4H
  JMPS VEC_SEG,VEC_OFF+0D8H
  JMPS VEC_SEG,VEC_OFF+0DCH
  JMPS VEC_SEG,VEC_OFF+0E0H
  JMPS VEC_SEG,VEC_OFF+0E4H
  JMPS VEC_SEG,VEC_OFF+0E8H
  JMPS VEC_SEG,VEC_OFF+0ECH
  JMPS VEC_SEG,VEC_OFF+0F0H
  JMPS VEC_SEG,VEC_OFF+0F4H
  JMPS VEC_SEG,VEC_OFF+0F8H
  JMPS VEC_SEG,VEC_OFF+0FCH
  JMPS VEC_SEG,VEC_OFF+100H
  JMPS VEC_SEG,VEC_OFF+104H
  JMPS VEC_SEG,VEC_OFF+108H
  JMPS VEC_SEG,VEC_OFF+10CH
  JMPS VEC_SEG,VEC_OFF+110H
  JMPS VEC_SEG,VEC_OFF+114H
  JMPS VEC_SEG,VEC_OFF+118H
  JMPS VEC_SEG,VEC_OFF+11CH
  JMPS VEC_SEG,VEC_OFF+120H
  JMPS VEC_SEG,VEC_OFF+124H
  JMPS VEC_SEG,VEC_OFF+128H
  JMPS VEC_SEG,VEC_OFF+12CH
  JMPS VEC_SEG,VEC_OFF+130H
  JMPS VEC_SEG,VEC_OFF+134H
  JMPS VEC_SEG,VEC_OFF+138H
  JMPS VEC_SEG,VEC_OFF+13CH
  JMPS VEC_SEG,VEC_OFF+140H
  JMPS VEC_SEG,VEC_OFF+144H
  JMPS VEC_SEG,VEC_OFF+148H
  JMPS VEC_SEG,VEC_OFF+14CH
  JMPS VEC_SEG,VEC_OFF+150H
  JMPS VEC_SEG,VEC_OFF+154H
  JMPS VEC_SEG,VEC_OFF+158H
  JMPS VEC_SEG,VEC_OFF+15CH
  JMPS VEC_SEG,VEC_OFF+160H
  JMPS VEC_SEG,VEC_OFF+164H
  JMPS VEC_SEG,VEC_OFF+168H
  JMPS VEC_SEG,VEC_OFF+16CH
  JMPS VEC_SEG,VEC_OFF+170H
  JMPS VEC_SEG,VEC_OFF+174H
  JMPS VEC_SEG,VEC_OFF+178H
  JMPS VEC_SEG,VEC_OFF+17CH
  JMPS VEC_SEG,VEC_OFF+180H
  JMPS VEC_SEG,VEC_OFF+184H
  JMPS VEC_SEG,VEC_OFF+188H
  JMPS VEC_SEG,VEC_OFF+18CH
  JMPS VEC_SEG,VEC_OFF+190H
  JMPS VEC_SEG,VEC_OFF+194H
  JMPS VEC_SEG,VEC_OFF+198H
  JMPS VEC_SEG,VEC_OFF+19CH
  JMPS VEC_SEG,VEC_OFF+1A0H
  JMPS VEC_SEG,VEC_OFF+1A4H
  JMPS VEC_SEG,VEC_OFF+1A8H
  JMPS VEC_SEG,VEC_OFF+1ACH
  JMPS VEC_SEG,VEC_OFF+1B0H
  JMPS VEC_SEG,VEC_OFF+1B4H
  JMPS VEC_SEG,VEC_OFF+1B8H
  JMPS VEC_SEG,VEC_OFF+1BCH
  JMPS VEC_SEG,VEC_OFF+1C0H
  JMPS VEC_SEG,VEC_OFF+1C4H
  JMPS VEC_SEG,VEC_OFF+1C8H
  JMPS VEC_SEG,VEC_OFF+1CCH
  JMPS VEC_SEG,VEC_OFF+1D0H
  JMPS VEC_SEG,VEC_OFF+1D4H
  JMPS VEC_SEG,VEC_OFF+1D8H
  JMPS VEC_SEG,VEC_OFF+1DCH
  JMPS VEC_SEG,VEC_OFF+1E0H
  JMPS VEC_SEG,VEC_OFF+1E4H
  JMPS VEC_SEG,VEC_OFF+1E8H
  JMPS VEC_SEG,VEC_OFF+1ECH
  JMPS VEC_SEG,VEC_OFF+1F0H
  JMPS VEC_SEG,VEC_OFF+1F4H
  JMPS VEC_SEG,VEC_OFF+1F8H
  JMPS VEC_SEG,VEC_OFF+1FCH
VEC_PROC ENDP
VECT_TAB ENDS

  end

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-07-15 13:00:11

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential