[meta-xilinx] Debugging U-Boot

Martin Townsend martin.townsend at xsilon.com
Mon Mar 31 05:28:48 PDT 2014


Hi,

I'm trying to debug U-Boot using XMD and GDB.  On my first attempt I 
found that it would successfully connect and when I typed target remote 
:1234 I would get the source for start.S.  I then tried to set a break 
point on board_init_f which worked and when I continued it broke at the 
right place.  The problem was I couldn't see the source.  Typing list 
board_init_f confirmed this.  I tried using dir to set the search 
directory to where board.c was and still no joy.
So after googling for a bit one page I found suggested using -gstabs, so 
I tried this and now gdb will find the source but I have to add the 
directory manually, and this means adding every directory in U-Boot that 
contains source for the Microblaze, which is not optimal.
Does anyone know a way of ensuring that the full or relative path 
information is included during the compilation/linking when using the 
Yocto build environment? For example with the linux-xlnx if I use 
mb-objdump -x I can see the following

00000000 l    df *ABS*    00000000 arch/microblaze/kernel/reset.o
c056b090 l     O .bss    00000004 handle
c056b08c l     O .bss    00000004 reset_val
00000000 l    df *ABS*    00000000 arch/microblaze/kernel/setup.o
c0002de4 l     F .text    0000001c dflt_bus_notify
c0002e00 l     F .text    00000038 microblaze_debugfs_init

but when I do the same for u-boot

00000000 l    df *ABS*    00000000
00000000 l    df *ABS*    00000000 xilinx_axi_emac.o
cfc17574 l     F .text    0000002c axiemac_halt
cfc175a0 l     F .text    00000060 axiemac_setup_mac
cfc17600 l     F .text    00000008 axiemac_bus_reset
--
00000000 l    df *ABS*    00000000
00000000 l    df *ABS*    00000000 phy.o
cfc17f1c l     F .text    00000154 phy_device_create
cfc37ef8 l     O .data    00000008 phy_drivers
cfc37f00 l     O .data    0000002c genphy_driver


I'm building u-boot-xlnx v2013.7

Here's my build configuration
Build Configuration:
BB_VERSION        = "1.20.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.10"
TARGET_SYS        = "microblazeel-oe-linux"
MACHINE           = "han9250-microblazeel"
DISTRO            = "brian"
DISTRO_VERSION    = "oe-core.0"
TUNE_FEATURES     = "microblaze v8.50 little-endian reorder barrel-shift 
pattern-compare divide-hard multiply-high"
TARGET_FPU        = "fpu-soft"
meta              = "dora:3cf2d232529c4fd6b58f87ddbf3df9d805e4180f"
meta-oe
meta-networking   = "dora:191499a2b54d04855284347ce5a067f998646be4"
meta-yocto
meta-yocto-bsp    = "dora:3cf2d232529c4fd6b58f87ddbf3df9d805e4180f"
meta-xilinx       = "dora:aa7d677515ab7d45bbd3bdd6c5383f4143147c6d"
meta-xsilon       = "master:37ff12f9e45ac6a040c88e2a0db08b23b7cf0a2a"



Any help appreciated,
Martin.




More information about the meta-xilinx mailing list