From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Bürgel To: egcs@cygnus.com Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] Porting to AT91 - problems with ARM/vectors.S Date: Wed, 13 Dec 2000 09:20:00 -0000 Message-id: <3A37AA37.5BC8A5C3@genologic.de> References: X-SW-Source: 2000-12/msg00292.html 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