[ECOS] Error when write a uint32 with not aligned pointer.
wang cui
iucgnaw@msn.com
Mon Feb 12 05:34:00 GMT 2007
Hi, compiler and ARM experts:
I am faceing a problem like below:
Arch of my target is arm7tdmi(lpc2xxx), little endian.
When I use a (cyg_uint32 *)ptr to write a 32bit value, it always error if
the ptr is not 4-byte aligned.
For example:
ptr = 0x8106409a;
*ptr = 0x00000001;
The result is not like:
0x81064098: 0xXX - shouldn't be modified
0x81064099: 0xXX - shouldn't be modified
0x8106409a: 0x01
0x8106409b: 0x00
0x8106409c: 0x00
0x8106409d: 0x00
but
0x81064098: 0x01
0x81064099: 0x00
0x8106409a: 0x00
0x8106409b: 0x00
0x8106409c: 0xXX - should be modified
0x8106409d: 0xXX - should be modified
It always cause problem when I use tcpip stack.(not cause problem for other
packages with luck)
So how to solve it? Should I modify some compiling options?
Thanks in advance!
_________________________________________________________________
Ãâ·ÃÃÃÃà MSN Explorer: http://explorer.msn.com/lccn
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list