Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > Embedded > RE: AT91SAM7: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 12418 of 13381
Post > Topic >>

RE: AT91SAM7: C-startup

by "Roman Mashak" <mrv@[EMAIL PROTECTED] > Jun 24, 2008 at 08:43 PM

Hello,

"Not Really Me" sc...@[EMAIL PROTECTED]
 wrote:

> You can use the relative addressing if all of your interrupt handlers
fit 
> in
> the first 32K of code (14 bit address range).  Some folks have a first 
> level
> handler in that space that dispatches to other relocatable code outside
of
> that range.

I see, it's a bit clearer now. And what about this snippet from the
Atmel's 
appnote "Getting started with at91sam7 controllers":
.....
reset_vector:
        ldr      pc, =reset_handler
undef_vector:
        b        undef_vector    /* Undefined Instruction */
swi_vector:
        b        swi_vector      /* Software Interrupt */
.....

They put the vectors table and IRQ handler in the seperate section named 
..vectors, while "reset_handler" in .text. Is that why they load absolute 
address of 'reset_handler' in to PC ?
By the way, I checked it disassembles in to "ldr pc, [pc, #NUM]", so it 
would be equivalently to write "ldr pc, [pc, #reset_handler]", is that
right 
?

> The second method allows you to put full 32 bit addresses in the table
> (which usually immediately follows the vectors).  Normally you boot from
> flash and then set up RAM and do a remap to put the RAM version of the
> vector table at 0.  Once that is done you can modify the jump table to
> install handlers.

Best regards, Roman Mashak
 




 3 Posts in Topic:
RE: AT91SAM7: C-startup
"Roman Mashak"   2008-06-24 20:43:14 
Re: AT91SAM7: C-startup
Tauno Voipio <tauno.vo  2008-06-25 14:48:58 
Re: AT91SAM7: C-startup
"Roman Mashak"   2008-06-26 13:48:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 16:40:49 CST 2008.