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: Stack access violations in eCos



> -----Original Message-----
> From:	Andrew Lunn [SMTP:andrew dot lunn at ascom dot ch]
> Sent:	19. marts 2003 12:06
> To:	Erik Aagaard Knudsen
> Cc:	'ecos-discuss at sources dot redhat dot com'
> Subject:	Re: [ECOS] Stack access violations in eCos
> 
> > I know that most gcc compilers places one dimensional char arrays on 4
> byte
> > boundaries. But this is not the case for multidimensional char arrays
> (and
> > there are some of these in eCos). Unfortunately my gcc compiler does not
> > place any char arrays on 4 byte boundaries. I use the arm-elf tool
> chain:
> > 
> > gcc version 3.0.2 20010924 (prerelease)
> > GNU assembler version 2.10.1 (arm-elf) using BFD version 2.10.1
> > GNU ld version 2.10.1 (with BFD 2.10.1)
> > 
> > This was the official tool chain at the time I loaded my first version
> of
> > eCos from the Red Hat homepage. Could that be a problem?
> 
> Could be. I've never had problems with 2.9-ecos-99r1. The latest
> supported compiler is gcc version 3.2.1. Try that. You can get it by
> using the new ecos-install.tcl script. Pass the -t flag and it will
> get just the prebuilt binaries.
	[Erik Aagaard Knudsen]  
	I fetched the script, but couldn't get it working it denies to
connect to your server (I am behind a firewall and can only do http and ftp
via a proxy, perhaps that is the reason). Anyhow I fetched the tarball
manually (with ftp) instead and got it installed, just to find out that my
cygwin was too old. So I got a new version of cygwin and installed it. And I
got it working now with the new toolchain. Unfortunately the problem is
exactly the same. Allocation of char arrays are not aligned on 4 byte
boundaries. I have made a small "hello world" program, where I allocated
some char arrays and checked in the linker map file to see how they were
placed. Global uninitialized char arrays are aligned on 4 byte boundaries
(in the COMMON section). Initialized char arrays are not aligned (in the
data section). Static uninitialized char arrays are not aligned (in the bss
section). Do you have other suggestions? I am using the exact same switches
for compiler and linker as the eCos configuration tool.

>     Andrew

-- 
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]