KGDB over serial on Jetson AGX Xavier

Is it possible to use KGDB over a serial connection on a Jetson AGX Xavier?

I’ve done the following:

  1. Connect micro-USB to port J501 on Jetson, USB-A on host machine
  2. On an SSH instance on the Jetson: echo ttyTCU0 > /sys/module/kgdboc/parameters/kgdboc, echo g > /proc/sysrq-trigger
  3. On host machine, sudo ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gdb ./vmlinux
  4. In GDB instance on host: target remote /dev/ttyUSB3

GDB gives this error on running the command above:

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

This post seems to imply that what I am trying to do isn’t actually supported on /dev/ttyTCU0 so I’ve also tried a serial connection over pins 8/10 on the header using an FTDI cable. But with this topology, I am not even able to open a minicom connection.

hello jack31,

why don’t you use ethernet to login the board, and using GDB for debugging.
I usually only enable serial console to gather logs, ssh to login and issue commands is more reliable.

@JerryChang Can you provide a reference on how to do this? My understanding was that you need to use KGDB to access kernel-space (I’m debugging driver code)

I have not looked at KGDB in a very long time, but here is an old thread related to this:
https://devtalk.nvidia.com/default/topic/1043341/jetson-agx-xavier/need-help-in-getting-kgdb-to-work/post/5294400/#5294400

@linuxdev thanks for the follow up - I’ve looked over this thread previously but it seems like the conclusion there was to try to connect to THS0, but this other thread implies that CONSOLE_POLL is not supported on any of the UART pins on the board

hello jack31,

it’s due to Jetson AGX Xavier is a combined UART, which KGDB did not support with that.
please refer to Topic 189830 for the steps to disable combined UART on Jetson AGX Xavier for confirmation,
thanks

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