This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM exception vector question


Tom Deconinck wrote:
Hi,

Perhaps of topic... because not 100% eCos related

I was wondering, is there a limitation on the address you can jump to
from an exception vector of an ARM 7? Can I jump to just any address?
(I thought I read something about this, but I can't find it
anymore...)

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?


Have you looked at the sources (hal/arm/arch/current/src/vectors.S)?


On the ARM, you can jump indirect through a pointer.  This is done
using the instruction
  ldr pc,<loc>
where <loc> is a longword that has the address you want to jump to.



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]