We are using BF609 board ported with uClinux 2012R1 buildroot distribution. We have the following code we want to run on BF609. However during debugging through gdbserver we are getting a SIGBUS error. I am pasting the code we are trying to debug and the gdb session below
in: .byte2 0x2828, 0x4444, 0x1234, 0x6DF0, 0x7777, 0xEEEE, 0x1B11, 0x5111;
out: .byte2 0,0,0,0,0,0,0,0;
loop loop1 LC0=p2;
(gdb) target remote 10.7.143.42:34251
Remote debugging using 10.7.143.42:34251
0x05418bc0 in ?? ()
(gdb) break main
Breakpoint 1 at 0x51a96d0: file A2.s, line 11.
warning: Unable to fetch _dl_debug_addr->.r_brk entry point (at address 0x00000000) from dynamic linker
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Program received signal SIGBUS, Bus error.
0x05620962 in *___GI_fflush_unlocked (stream=0x5399800)
91 libc/stdio/fflush.c: No such file or directory.
While debugging this step by step, we noticed that when at the line l0=16; or any multiples of 16, the value of l0 is assigned as 0xa1. Maybe that is why we might be getting the error. Can you look into this and suggest a solution?