Porting KGDB error, Need help!!!

hi nvidia:

I open the config:

root@xavier:   echo ttyTCU0,115200 >/sys/module/kgdboc/parameters/kgdboc
root@xavier:/home/dji# echo -n g >/proc/sysrq-trigger
[  216.839280] sysrq: SysRq : DEBUG
[  216.839382] KGDB: Entering KGDB


  1. sudo prebuilts/gcc/kernel/gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gdb out/KERNEL/vmlinux

2)、set serial baud 115200
(gdb) target remote /dev/ttyUSB3
Remote debugging using /dev/ttyUSB3
Ignoring packet error, continuing…
warning: unrecognized item “timeout” in “qSupported” response
Ignoring packet error, continuing…
Remote replied unexpectedly to ‘vMustReplyEmpty’: timeout

I want to know how to solve this timeout??

Hello keith.wang,

Since the driver for ttyTCU0 doesn’t support polling, kgdb is not supported on L4T kernel for Xavier. And that’s why you are receiving “timeout” messages on the gdb prompt on your PC.

For TX1 and TX2, since the serial console is on ttyS0 whose driver implements polling (serial_8250, CONFIG_CONSOLE_POLL), kgdb is supported on those boards.

hi anish:
Does xavier’s serial port ttyTHS support polling? Whether it can realize its rotation API can be used for KGDB communication?

Hello Keith,

Same as ttyTCU0’s implementation I didn’t see CONSOLE_POLL in the ttyTHS’s implementation as well, so unlikely it will work. However, I have not tried it.

May be updating the 40-pin header GPIO configuration to use pins 8,9 and 10 as UART …