What is a vector file?

Home Email home_email2000@yahoo.com
Sun Oct 22 09:31:00 GMT 2000

In studying a boot prom for an Hitachi SH032 along
with the source code, I am beginning to get a good
understanding of how the GNU AS, LD works. However,
when I read in the boot prom I have into my programmer
I find locations 0x0000 - 0x01C7 filled with various
hex numbers that I don't know what they are.  I do
know my code begins at 0x01C8.   While studying the
source code I believe that what I have at the 
beginning of the boot prom is something generated by 
this one source file called Vectors.S.  But what is
this file?  It seems as though it is setting up the
Hitachi microcontroller before it begins executing
code.  Here is some sections of this vector.S file...

  This file contains the vectory overlay for the
  This file references 2 other interrupt handlers
  1. _start - entry point of program
  2. _interruptDispatch - for soft vectoring all the
other interrupts

/* ...Global Variables:

  .extern ShTest
  .extern _interruptDispatchRsv
  .extern _interruptDispatch4
  .extern _interruptDispatch6

...this continues down for many many lines of this
....and then I see this....

  .extern _stack

/* ...Local Variables:

/* ...Routines:
  .section VECTORS
  .globl _vectors

 .int  ShTest       ! 000-003 0  Power up Reset Vector
 .int  _stack       ! 004-007 1  Power Up Stack
 .int  ShTest       ! 008-00B 2  Manual Reset Vector
 .int  _stack       ! 00C-00F 3  Manual Reset Stack
 .int  _interruptDispatch4      ! 010-013 4  Invalid
 .int  _interruptDispatchRsv     ! 014-017 5  Reserved
 .int  _interruptDispatch6    ! 018-01B 6  Invalid
Slot Instruction
 .int  _interruptDispatchRsv     ! 01C-01F 7  Reserved
 .int  _interruptDispatchRsv     ! 020-023 8  Reserved
 .int  _interruptDispatch9  ! 024-027 9  CPU bus error

....this continues on down and finally ends with

 .int  _interruptDispatchRsv     ! 1BC-1BF 111 A/D 

/* ...Watch Dog Timer
 .int  _interruptDispatch112       ! 1C0-1C3 112 WDT

/* ...Refresh Control
 .int  _interruptDispatch113         ! 1C4-1C7 113 REF


I am but just a learner here so bear with me while I
ask some dumb questions.....

It looks as though as soon as the microcontroller
begins it is initalizing itself.  Is this what the
vector file is for?
Do all embedded microcontrollers use a file like this
at the beginning of their their boot prom and how much
intialization is necessary?
Is there any documentation about vector files and how
to use them (or other methods)?

Thanks for any help on this.


Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.

Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

More information about the crossgcc mailing list