How to Debug Uboot or Linix using ELF

238 views
Skip to first unread message

Shreyas Hemachandran

unread,
Dec 17, 2020, 6:59:25 AM12/17/20
to inside...@googlegroups.com
HI All,

What do I have:
1) Board
2) Tool chain for the board.
3) Debugger to run a ELF on the Board.
4) The board runs Linux and Uboot. (By default)
5) The Source code of Linux and Uboot is available.

What do i want to do?
  1) I want to run Uboot using the Debugger on the board. (uboot elf is available, when we compile it).
 2) I want to run Linux using the Debugger on the board. (vmlinux elf is available, when we compile linux source code)

What is the problem I am facing?
1) UBoot:
    - I may not be compiling Uboot with Debug symbols, i see only disassembly files when debugging. How to compile Uboot with Debug Symbols.
    - Uboot when run using the debugger, stops at a place telling, "A VALID DTS file is missing". and then waits forever in a loop. How to give a DTS file when debugging using a debugger?

2) Linux:
  - I have the same questions as Uboot. I face both Debug Symbols and DTS Problem. Any idea to resolve both?

Any ideas appreciated... Thanks in advance....

--
Thank you.

Regards,
             Shreyas Hemachandran

Anil Kumar Pugalia

unread,
Dec 21, 2020, 2:33:49 AM12/21/20
to inside...@googlegroups.com

For debug symbols, you may just add the -g option in CFLAGS in both cases. But I am not clear as how are running the debugger with uboot & Linux.

Regards
Anil
Passion: http://sysplay.in (Playing with Systems)
Shreyas Hemachandran wrote on 17/12/20 5:29 pm:
--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inside_linux/CANysAj3dywoCtkQM%3D7pVCH_3pCkP-g1Dg-0xnQDEBwsXRMnSPw%40mail.gmail.com.

Shreyas Hemachandran

unread,
Jan 7, 2021, 3:12:44 AM1/7/21
to inside...@googlegroups.com
Hi Anil,

Sorry for replying late. We have Lauterbach Debugger, which can download uboot and vzimage (linux kernel image) both elfs to our board.
we can see that the code is loaded. The problems are
1) No debug symbols are present in these elfs (uboot and as well as vzimage). Where to add -g option in this enormous projects uboot and linux, please let me know.
2) Next, After I downloaded the image, I could run the each image. Both of this gives the same problem, that is, it needs a dts file to be given, to run. - How to bypass dts file to load uboot and linux.

Regards,
Shreyas H


Anupama K

unread,
Jan 8, 2021, 4:03:53 AM1/8/21
to inside...@googlegroups.com
Hi,
    I think, the following link may be useful for you:
https://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5_sdk7

It describes debugging U-Boot and Linux kernel using Code Composer Studio in TI EVMs. 

regards,
Anupama

Shreyas Hemachandran

unread,
Jan 11, 2021, 12:42:50 AM1/11/21
to inside...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages