I am trying to debug a kernel on a proprietary ADSP-BF516 board using a gnICE JTAG. I can set hardware breakpoints and gdb can assert control over the hardware. I am unable to debug the kernel, likely due to a mismatch between executing code and the symbols loaded into gdb. Any assistance would be appreciated.
I am following the instructions from: toolchain:debug:gdbproxy [Analog Devices Open Source| Mixed-signal and Digital Signal Processing ICs]
I have modified the buildroot configuration (enable debug and turn off optimization)
BR2_ENABLE_DEBUG=y
BR2_OPTIMIZE_0=y
I have modified the kernel configuration (enable frame pointers and debug information)
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_INFO=y
uImage is not recognized as containing debug information
$ bfin-elf-gdb uImage
..
"/tftpboot/uImage": not in executable format: File format not recognized
Following the gdbproxy instructions I can connect to the gdbproy using vmlinux and debug symbols are loaded
$ bfin-elf-gdb vmlinux
I now load the Blackfin kernel using u-boot, vmlinux fails:
bfin> tftp 0x01000000 vmimage; bootm
Filename 'vmlinux'.
Load address: 0x1000000
Loading: #################################################################
...
####################################################
1.7 MiB/s
done
Bytes transferred = 32244582 (1ec0366 hex)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
bfin> boote 0x1000000
## No elf image at address 0x01000000
If I load uImage (created with the same settings), the kernel starts, I can set breakpoints, but the debug flow does not match program execution.
bfin> tftp 0x01000000 uImage; bootm
Please let me know if there are any other details I can provide.