This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Porting to AT91 - problems with ARM/vectors.S


Gary Thomas wrote:

> > If I exchange following instruction
> >> ldr     pc,.reset_vector                // 0x00
> > with
> >> b reset_vector
> > everything works fine even without any comment-signs before vectors.S
> > stuff.
> > I don't understand _why_ the original load-instruction doesn't work in
> > my case but it's a fact. (Mulder? Scully? ...)
> 
> Look closely at the definition of .reset_vector

I do so, but hey - where are my glasses?
The .text-section starts at 0x1000060 and even this word (0x1000060) is
stored at address 0x1000020 (aka .reset_vector). I think that's the
problem. After the reset the ROM starts at 0x0, so you have to jump to
the physical (= logical) address 0x0000060 (not 0x1000060!) to enter
PLATFORM_SETUP1. This is the reason why "b reset_vector" works, because
it jumps _relative_.

> Did you define "CYGHWR_HAL_ARM_HAS_MMU" by any chance?

"CYGHWR_HAL_ARM_HAS_MMU" is definitly not defined, nowwhere. But if I
define it,
0x0000080 - I wonder why - is stored at 0x1000020 which means a jump
somewhere right into my PLATFORM_SETUP1 but _not_ the beginning.


-- 
--------------------------------------------------
Andreas Bürgel   Software Engineer
ab@genologic.de  GenoLogic GmbH, Dortmund, Germany

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