AnsweredAssumed Answered

i.MX6: KGDB is not working on cross UART

Question asked by Dharani. R on Dec 9, 2014
Latest reply on Feb 15, 2016 by Carlos Sánchez de La Lama

Dear All,

             I am trying to debug the kernel with GDB based on below steps.

 

Boot arguments:

setenv bootargs console=ttymxc1,115200 kgdbwait kgdboc=ttymxc0,115200 root=/dev/nfs nfsroot=<ServerIP>:/nfs-setup/rfs ip=<Target-IP>::<Gateway-IP>:<Netmask-IP>:iMX6:eth0:off rw rootwait

 

After board boots, the kernel entering in to GDB to debug the kernel as:

imx-sdma 20ec000.sdma: initialized

Serial: IMX driver

2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX

console [ttymxc1] enabled

 

When I run the vmlinux from host, I get the below error:

(gdb) target remote /dev/ttyUSB1

Remote debugging using /dev/ttyUSB1

Ignoring packet error, continuing...

warning: unrecognized item "timeout" in "qSupported" response

Ignoring packet error, continuing...

Ignoring packet error, continuing...

Bogus trace status reply from target: timeout

 

If I use the same UART port for both console and KGDBOC, I could debug the kernel based on below arguments

setenv bootargs console=ttymxc1,115200 kgdbwait kgdboc=ttymxc1,115200 root=/dev/nfs nfsroot=<ServerIP>:/nfs-setup/rfs ip=<Target-IP>::<Gateway-IP>:<Netmask-IP>:iMX6:eth0:off rw rootwait

and

(gdb) target remote /dev/ttyUSB0

 

Why can't I debug the kernel, when I use one UART for console and another UART for kgdboc?

 

Regards,

Dharanendiran.R

Outcomes