KGDB on i.MX8 serial

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KGDB on i.MX8 serial

2,707件の閲覧回数
lorenzo_giraudi
Contributor III

 Hello,

I am trying to debug the Linux Kernel remotely using KGDB over the serial port.

I followed the instruction shown here: https://elinux.org/images/1/1b/ELC19_Serial_kdb_kgdb.pdf but can't make it to work. This is what I get:

  • I can do echo ttyLP0 > /sys/module/kgdboc/parameters/kgdboc and it gets successfully registered (note: ttyLP0 is my console too)
  • when I do echo g > /proc/sysrq-trigger I get messages telling that the kernel dropped into kdb, then I see the kdb prompt but it stops there, when I try to type nothing happens

I have the idea that it may involve the polling functions lpuart32_poll_put_char and  lpuart32_poll_get_char but I do not know how to debug it.

It would be great to know if someone from NXP ever tried it.

BR,

Lorenzo

0 件の賞賛
返信
2 返答(返信)

2,673件の閲覧回数
nxf63675
NXP TechSupport
NXP TechSupport

Hi Lorenzo,

 

Connecting the debugger can work in my side, as follows:

pastedImage_1.png

For gdb-multiarch, customer need to "set architecture aarch64" firstly,then "target remote /dev/ttyUSBx".

pastedImage_2.png

Another method:

If you want to extending the terminals, they can use agent-proxy. The steps is as follows:

pastedImage_3.png

in another terminal:

pastedImage_4.png

Then in the third terminal, executing "gdb-multiarch vmlinux" or "aarch64-poky-linux-gdb vmlinux"  to connect target.

pastedImage_5.png

Note the last picture, "target remote localhost:5551" when connecting target.

 

Best Regards,

Israel H.

0 件の賞賛
返信

2,620件の閲覧回数
lorenzo_giraudi
Contributor III

Hello Israel,

Thank you very much for the detailed description. I will try to replicate it and see if I can do that.

Best regards,

Lorenzo Giraudi

0 件の賞賛
返信