This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Byte array address alignment
- From: Uwe Kindler <uwe dot kindler at cetoni dot de>
- To: ecos-discuss at sourceware dot org
- Cc: embeddedeng at hotmail dot com
- Date: Wed, 26 Oct 2005 08:30:49 +0200
- Subject: [ECOS] RE: Byte array address alignment
Hello,
not all compilers align byte arrays to a 4 byte boundary on a 32 bit
machine or to a 2 byte boundary on a 16 bit machine. Even the GNU
comiler does not follow these alignment rules for all machines. For
example the h8300-elf toolchain does not align byte arrays and this is a
big problem for eCos development because the eCos source code contains a
number of byte arrays (i.e. the idle thread stack) that are expected to
be aligned. In my opinion, if a certain alignment of arrays is required
it should be explicit declared by using another data type (i.e. short or
long).
Regards, Uwe
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss