# KGDB over serial on Jetson AGX Xavier

**URL:** <https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191>\
**Category:** Jetson AGX Xavier\
**Tags:** nvbugs, kernel\
**Created:** [October 4, 2021, 9:03pm UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191 "2021-10-04T21:03:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack31](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jack31](https://forums.developer.nvidia.com/u/jack31)\
**Post date:** [October 4, 2021, 9:03pm UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/1 "2021-10-04T21:03:27Z")

</div>

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:

```auto
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](https://forums.developer.nvidia.com/t/porting-kgdb-error-need-help/81764) 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.

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [October 5, 2021, 2:59am UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/3 "2021-10-05T02:59:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jack31](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jack31](https://forums.developer.nvidia.com/u/jack31)\
**Post date:** [October 5, 2021, 6:05pm UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/4 "2021-10-05T18:05:41Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [October 5, 2021, 6:17pm UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/5 "2021-10-05T18:17:11Z")

</div>

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](https://devtalk.nvidia.com/default/topic/1043341/jetson-agx-xavier/need-help-in-getting-kgdb-to-work/post/5294400/#5294400)

---

<div class="post-metadata">

**Author:** ![jack31](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jack31](https://forums.developer.nvidia.com/u/jack31)\
**Post date:** [October 5, 2021, 6:23pm UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/6 "2021-10-05T18:23:52Z")

</div>

@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](https://forums.developer.nvidia.com/t/porting-kgdb-error-need-help/81764) implies that `CONSOLE_POLL` is not supported on any of the UART pins on the board

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [October 6, 2021, 6:27am UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/7 "2021-10-06T06:27:09Z")

</div>

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](https://forums.developer.nvidia.com/t/189830/26/) for the steps to disable combined UART on Jetson AGX Xavier for confirmation,  
thanks

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [November 4, 2021, 1:22am UTC](https://forums.developer.nvidia.com/t/kgdb-over-serial-on-jetson-agx-xavier/191191/10 "2021-11-04T01:22:57Z")

</div>

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