Kernel Debug issu on serial bug

Hello

I’m trying to debug kernel using instruction as per https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/debugging_kgdb.html#.

  • recompiled the kernel
  • copied the Image on development board at /boot
  • verified that on reboot the system runs, displayed what required by the guide
root@videosystems-jn:~# zcat /proc/config.gz | egrep 'CONFIG_KGDB|KDGB|KDB|CONFIG_FRAME_POINTER|CONFIG_WATCHDOG|IKCONFIG'
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_WATCHDOG is not set
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_KGDB_KDB=y
CONFIG_KDB_DEFAULT_ENABLE=0x1
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
ype or paste code here
  • modified extlinux as described to stop kernel during boot
  • connect from host with a serial console
/home/nvidia/gdb-11.2/gdb/gdb /home/nvidia/JetsonNano/kernel_build/vmlinux 
[sudo] password for nvidia: 
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/nvidia/JetsonNano/kernel_build/vmlinux...
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout

As you see, the debug could not be done because the last errors. Did someone found the same issue?

K.R.

Did you confirm the UART working well?

Hello
Yes, as I can see…I used it a lot of times, of course only for command line but I haven’t faced something strange. It is connected via a FTDI chip to the same PC where I cross compile.

K.R.

Hello Shane, any suggestions on this topic?
I share a consideration, running kernel in debug mode works well with the serial IF going step by step with commands on serial line. Example, if I put “go” it runs. But not with gdb.

I also find a difference with the tags of the kernel enabled. I see that “CONFIG_WATCHDOG” is enabled. It is involved?

@f.ortolano
This feature only for TX2 only suppose don’t support on Nano(TX1)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.