<div dir="ltr">Thanks.<div><br></div><div style>It is the problem of cp15.</div><div style>I use the common mmu_init in arm920/mmu.c, which enables strict align access.</div><div style><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/4/25 Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 04/25/2013 08:34 AM, Peng Fan wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
The step debug log is listed below:<br>
Breakpoint 2, 0x00000814 in Init (ignored=<optimized out>)<br>
at ../../../../../../../rtems/c/<u></u>src/../../testsuites/samples/<u></u>hello/init.c:32<br></div>
32strncat(dest, tmp, 10);<br>
1: x/i $pc<br>
=> 0x814 <Init+68>:strhr3, [r4, r0] *//r4+r0 is unaligned.*<br>
(gdb) i r r0<br>
*r0 0x11*<br>
(gdb) i r r4<br>
*r4 0x1b6bc112316*<div class="im"><br>
(gdb) i r r3<br>
r3 0x2f47<br></div>
(gdb) c *//It is ok*<div class="im"><br>
Continuing.<br>
*** HELLO WORLD TEST ***<br>
Hello World<br>
*** END OF HELLO WORLD TEST ***<br>
[Inferior 1 (process 42000) exited with code 05]<br>
<br>
No error msg with "strh r3, [r4, r0]", when arm-rtemseabi4.11-run hello.exe. I<br>
do not know why.<br>
</div></blockquote>
<br>
Please have a look in the ARM1176JZF-S manual. You may have to enable the unaligned access in the CP15.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div></div></blockquote></div><br></div>