Memory address not aligned with leon2
Jiri Gaisler
jiri at gaisler.com
Thu Mar 20 00:09:35 UTC 2008
If you run your application with sparc-rtems-gdb connected to
tsim-leon, the execution will stop on the exact instruction that
takes the trap. You can then inspect both the C code and the
assembly that cause the problem.
Jiri.
Ingolf Steinbach wrote:
> Bonjour, Stefane.
>
> 2008/3/17, Arquer Stephane <stephane.arquer at c-s.cnes.fr>:
>> I work with a custom leon2 bsp over Rtems 4.8.
>> I get the trap(0x07) : memory address not aligned at the address
>> 0x400af460.
>>
>> Could someone explain to me what this error is in simple words ?
>
> You are probably accessing a 16, 32, or 64 bit value at an address
> which is not suitably aligned: 16 bit: a0=0; 32/64 bit: a0=0 and a1=0
> (a0 and a1 being address bits).
>
>> Do you have an idea where I could find the source of such a problem ?
>
> This is often caused by a bad cast.
>
> 1. Try to locate the function at 0x400af460 (for instance using
> sparc-rtemsXXX-nm).
>
> 2. If it is in your application: watch out for suspicious cast
> operations. Or maybe you have forgotten to reset a "pack" attribute.
>
> 3. If it is in RTEMS, you might find out more if you run your
> application in a debugger and place a breakpoint at the above address.
>
> Bon courage!
> Ingolf
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
>
More information about the users
mailing list