ARM and interrupts
Bill Gatliff
bgat@billgatliff.com
Thu Mar 18 15:59:00 GMT 2004
Toralf:
> How about the stack pointer etc.? Do I have to set up that
> specifically for IRQ mode, too? Is the morale perhaps that I simply
> can't use the crt0 provided with newlib? (I was otherwise thinking
> that I might simply insert the vectors in front of it, if you now what
> I mean.)
It depends. Angel, when present, sets up the stack pointers for all
operational modes. If you turn of RDP/RDI, you expose a bug whereby the
stack pointer gets initialized to a value that causes it to gobble up
your program!
You're mostly correct: for embedded work you'll need to roll your own
_start function. Use the crt0 that comes with newlib as a guide, but
note that it doesn't do anything involving the various stack pointers
for the "other" modes. See gdbstubs for that if you need examples.
>> See also the ARM Architecture Reference Manual, by David Seal. It
>> contains some brief examples too.
>
>
> I'll have a closer look at what you mention here...
The book is good, but it isn't cheap. But hey, lack of knowledge on
these details is even more expensive!
> We also found some example code for a test board from Motorola (we're
> actually using a Motorola CPU with ARM core), and it turns out that
> they also have an "Interrupt Controler" application note that's quite
> helpful (unlike the CPU reference manual, I might add..)
Yes, I was going to mention something related to that. With the
"advanced/vectored interrupt controllers" that are all the rage now,
there are some nifty tricks you can use to really boost interrupt
handling performance. I have examples, but if there are some in your
manuals then go with them.
b.g.
--
Bill Gatliff
bgat@billgatliff.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list