Unaligned problem when porting rtems for arm

Peng Fan van.freenix at gmail.com
Thu Apr 25 10:54:23 UTC 2013


Thanks.

It is the problem of cp15.
I use the common mmu_init  in arm920/mmu.c, which enables strict align
access.



2013/4/25 Sebastian Huber <sebastian.huber at embedded-brains.de>

> 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<sebastian.huber at embedded-brains.de>
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20130425/8de6e902/attachment-0001.html>


More information about the users mailing list