public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Re: What is a vector file?
@ 2000-10-22 15:28 Home Email
  0 siblings, 0 replies; 4+ messages in thread
From: Home Email @ 2000-10-22 15:28 UTC (permalink / raw)
  To: Keith Wright; +Cc: crossgcc

In the last five hours since I wrote this I have done
nothing read, read, read GNU AS,LD and Hitachi manual.
 I understand now what is going on and how this is
working.  It's slowly coming together for me.

Thanks for your response.

R.F.


--- Keith Wright <kwright@gis.net> wrote:
> > From: Home Email <home_email2000@yahoo.com>
> > 
> > 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.
> 
> Clearly, you are out of your depth, but you may be
> swimming in a minute.  You need to learn about the
> hardware you are running on.  Go to Hitachi and ask
> for the SH032 "Principles of Operation",
> "Programmer's
> Reference", or "Instruction Set List".  I don't
> know what it's called by Hitachi, and I don't have
> it,
> so don't ask me more about that.  Some general book
> on programming microprocessors may also be helpful.
> 
> > FILE NAME:
> >   Vectors.S
> > FUNCTION:
> >   This file contains the vector overlay for the
> >   SH7000  microcontroller.
> 
> ... so on.  Much more than we need to see of the
> interrupt vector table.  Go learn what an interrupt
> vector table is, the comment says all that could be
> said, you need to learn the language it is written
> in.
> 
> > I am but just a learner here so bear with me while
> I
> > ask some dumb questions.....
> 
> I'm being as polite as I can, given my abrasive
> personality.
> 
> > It looks as though as soon as the microcontroller
> > begins it is initalizing itself.  Is this what the
> > vector file is for?
> 
> Its a list of addresses to jump to when an interrupt
> happens.  Different addresses for different
> interrupts.
> One interrupt is Power-on and Reset.
> 
> > Do all embedded microcontrollers use a file like
> this
> > at the beginning of their their boot prom
> 
> You could imagine doing it in other ways, but
> _every_
> boot prom does it somehow, whether it is embeded in
> a can opener or largest Supercomputer of the week.
> 
> > and how much intialization is necessary?
> 
> See processor reference and motherboard schematic.
> 
> > Is there any documentation about vector files and
> how
> > to use them (or other methods)?
> 
> CS 201, Undergraduate Intro to Computer
> Architecture.
> 
> > Thanks for any help on this.
> 
> De nada.
> 
> ------
> Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* What is a vector file?
@ 2000-10-22  9:31 Home Email
  2000-10-22 14:21 ` Keith Wright
  2000-10-23  9:08 ` Michael Schwingen
  0 siblings, 2 replies; 4+ messages in thread
From: Home Email @ 2000-10-22  9:31 UTC (permalink / raw)
  To: crossgcc

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...

/*----------------------------------------------------
FILE NAME:
  Vectors.S
FUNCTION:
  This file contains the vectory overlay for the
SH7000
  microcontroller.
ROUTINES:
NOTES:
  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
stuff
....and then I see this....

  .extern _stack

/* ...Local Variables:
*/

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

_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
Instruction
 .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
this..

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

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

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

 .end

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.

R.Floyd










__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-10-23  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-22 15:28 What is a vector file? Home Email
  -- strict thread matches above, loose matches on Subject: below --
2000-10-22  9:31 Home Email
2000-10-22 14:21 ` Keith Wright
2000-10-23  9:08 ` Michael Schwingen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).