This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: ARM exception vector question
On 2008-02-27, Tom Deconinck <t.deconinck@gmail.com> wrote:
> I was wondering, is there a limitation on the address you can
> jump to from an exception vector of an ARM 7?
A direct jump has to be within a certain offset (64K?, I
forget...). You can jump anywhere by using an indirect jump
(through a pointer that has to be located within that same
offset).
> Can I jump to just any address? (I thought I read something
> about this, but I can't find it anymore...)
Yes, if you use an indirect jump.
> I have 2 setups: one running code exclusively out of internal and
> external ram, and that works fine.
>
> The other one is running the exact same code, but from external flash.
> If I dump the memory where the exception vectors are located (code
> running from external flash), I get this:
> 00000000 : 0xe59ff018 - 442503144 ....
> 00000004 : 0xe59ff018 - 442503144 ....
> 00000008 : 0xe59ff018 - 442503144 ....
> 0000000c : 0xe59ff018 - 442503144 ....
> 00000010 : 0xe59ff018 - 442503144 ....
> 00000014 : 0xeafffffe - 352321538 ....
> 00000018 : 0xe59ff018 - 442503144 ....
> 0000001c : 0xe59ff018 - 442503144 ....
> 00000020 : 0x10000040 268435520 @...
> 00000024 : 0x10000164 268435812 d...
> 00000028 : 0x10000188 268435848 ....
> 0000002c : 0x100001b4 268435892 ....
> 00000030 : 0x100001d0 268435920 ....
> 00000034 : 0xe59e0100 - 442629888 ....
> 00000038 : 0x100002d0 268436176 ....
> 0000003c : 0x10000298 268436120 ....
> 00000040 : 0xe92d500e - 382906354 .P-.
>
> e.g. the IRQ vector (0x34) jumps directly to an address in external
> flash, is this allowed or do I need to jump to another location first?
It depends on how far away the destination is. There used to
be a bug in the assembler where it wouldn't warn you when you
tried to jump to an absolute address that was out of range, but
that's been fixed for years.
--
Grant Edwards grante Yow! I'm totally DESPONDENT
at over the LIBYAN situation
visi.com and the price of CHICKEN
...
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss