Unaligned problem when porting rtems for arm

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Apr 25 07:34:04 UTC 2013


On 04/25/2013 08:34 AM, Peng Fan wrote:
> The step debug log is listed below:
> Breakpoint 2, 0x00000814 in Init (ignored=<optimized out>)
>      at ../../../../../../../rtems/c/src/../../testsuites/samples/hello/init.c:32
> 32strncat(dest, tmp, 10);
> 1: x/i $pc
> => 0x814 <Init+68>:strhr3, [r4, r0] *//r4+r0 is unaligned.*
> (gdb) i r r0
> *r0             0x11*
> (gdb) i r r4
> *r4             0x1b6bc112316*
> (gdb) i r r3
> r3             0x2f47
> (gdb) c *//It is ok*
> Continuing.
> *** HELLO WORLD TEST ***
> Hello World
> *** END OF HELLO WORLD TEST ***
> [Inferior 1 (process 42000) exited with code 05]
>
> No error msg with "strh r3, [r4, r0]", when arm-rtemseabi4.11-run hello.exe. I
> do not know why.

Please have a look in the ARM1176JZF-S manual.  You may have to enable the 
unaligned access in the CP15.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list