How to compile u-boot with debug option?

Chan Kim ckim at etri.re.kr
Tue Oct 19 04:21:38 CEST 2021


Hello,

 

With these commands,

make ARCH=arm CROSS_COMPILE=aarch64-none-elf- qemu_arm64_defconfig 

make ARCH=arm CROSS_COMPILE=aarch64-none-elf-

I see only u-boot.bin. How can I make u-boot.elf with debug info?

I found https://lists.denx.de/pipermail/u-boot/2005-May/010240.html and
tried adding

-DDEBUG to CFLAGS_NON_EFI in arch/arm/config.mk and adding CFLAGS += -DDEBUG
in arch/arm/cpu/armv8/config.mk

But after doing "make ARCH=arm CROSS_COMPILE=aarch64-none-elf- u-boot.elf",
when I give file command for the u-boot.elf, it says

 

u-boot.elf: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
statically linked, not stripped

 

I think I should see "with debug_info, not stripped". With connecting gdb, I
can't see the source file. The run responds to 'continue' command though.

Could any tell me what I can do?

 

Thank you,

Chan Kim

 



More information about the U-Boot mailing list