Kernel Debugging on Jetson Orin Nano Devkit

Hello,

I am trying to debug the kernel over serial. I have followed the tutorial and was able to login and such. However, whenever I tried to set kgdboc to ttyTCU0, my device just hangs (and reboot due to watchdog). I would appreciate if i can get any direction.

Thanks

Hi juanz459,

What’s your Jetpack version in use?

Currently, KGDB is not available for combined UART (/dev/ttyTCU0) because it implements with interrupt rather than polling.

May I know what’s your use case for kernel debugging? Do you hit any kernel panic issue?

I am currently using Jetpack 6.0 and want to test the debug environment for some of the modules I have made.

I tried with ttyAMA0 with CONFIG_USB_SERIAL enabled but still no luck.

Switching kernel message to another UART interface is not an easy work.

Have you tried to just add the debug message(through printk) to develop your kernel driver?

Yeah but at the end of the day I would love to have a full debugging capability for the device I purchased in case some errors popping out.

I really dont have an issue with the interface. It really does not matter whether its through usb or uart port. I think I just need some guidance on setting the environment correctly to enable KGDB for debugging my prototype modules.

with that being said, so is there no way to actually enable kgdboc over usb or uart without making a big change? If so, how do you enable /dev/ttyTHS0 (pin8 & pin10 on J12)?

Hi juanz459,

We are checking this issue internally and will get back to you once we get the result.

Ok. In the meantime, I will look through dtb and see if I can disable combined uart (UART2) and enable the normal serial on the expansion header (UART1).

Sorry that we still could not work it out for KGDB feature currently.
We would remove the page from developer guide.

So is kgdb not available on Jetson Orin Nano Devkit? This does not make any sense. It is a devkit and NVIDIA pitched it as such…
I went through many questions on the forum and it seems there is a way to do it on other Jetson platforms…I would really appreciate if you can double check the issue internally…

Sorry that the guide is inherited from old release(maybe r32.x) and I think we didn’t verify it on Orin Nano devkit with the current release.
I think the working case you referred to is from older release.

Or could you try if Orin NX Uart Problem - #7 by KevinFFF working in your case to add debug UART output from another interface?

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