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]
Other format: [Raw text]

Re: compile redboot error for AT91EB40


On Sun, 2002-08-11 at 04:30, Andrew Lunn wrote:
> On Sat, Aug 10, 2002 at 04:41:57PM -0600, Gary Thomas wrote:
> > On Sat, 2002-08-10 at 17:58, shouyi wrote:
> > > ecos-discuss:
> > > 
> > > When I compile redboot for AT91EB40 board, there is a error occured.
> > > 
> > > arm-elf-gcc -c  -I/ecos-g/OS/eCos/temp/redboot_eb40_1_install/include -I/ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current -I/ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current/src -I/ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current/tests -I. -I/ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current/src/ -mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -Wp,-MD,src/redboot_linux_exec.tmp -o src/hal_arm_arch_redboot_linux_exec.o /ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current/src/redboot_linux_exec.c
> > > /ecos-g/OS/eCos/CVS/ecos/packages/hal/arm/arch/current/src/redboot_linux_exec.c:75: #error 
> > > make[1]: Leaving directory `/ecos-g/OS/eCos/temp/redboot_eb40_1_build/hal/arm/arch/current'
> > > make[1]: *** [src/redboot_linux_exec.o.d] Error 1
> > > make: Leaving directory `/ecos-g/OS/eCos/temp/redboot_eb40_1_build'
> > > make: *** [build] Error 2
> > > 
> > > if I remark line 75 in redboot_linux_exec.c, it will be ok. 
> > > 
> > > So, what is the matter, is there any effect if I remark the 75th line?
> > > 
> > > how to resolve this problem?
> 
> This is broken for quite a lot of the ARM targets. The hal/arm/arch
> code assumes the macro CYGARC_PHYSICAL_ADDRESS is defined in the
> HAL. Only a few do define it: aaed2000, excalibur, ebsa, intergrator,
> sa11x0 & xscale. The others are broken.
> 
> Interestingly, the actual code is..
> 
> #ifndef CYGARC_PHYSICAL_ADDRESS
> # error
> # define CYGARC_PHYSICAL_ADDRESS(x) (x)
> #endif
> 
> So it looks like whoever wrote the code thinks a sensible fall back is
> to assume a straight 1-1 mapping. The HAL can override this if
> required.
> 
> May we should just remove the #error line and fix any HALs that are
> reported not to work?

I think the #error is serving it's purpose.  IMO, there can be no 
reasonable fallback and making any assumptions like that is asking
for trouble.  I didn't write that particular line in that file, but
I do agree with the idea [of forcing HAL writers to think about what's
going on]

The biggest failing at the moment is that this file is being built
for *all* ARM targets.  Most of them don't run Linux and never will,
so we should set things up such that only the targets that actually
need this code get it.  I'd suggest adding an interface which must
be "implemented" by HALs that want/need the Linux functionality.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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


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