无法通过串口远程调试gdbserver

问题描述 投票:0回答:1

我正在尝试使用gdbserver进行远程调试。

我使用此命令通过USB端口将目标设备连接到PC,打开终端控制我的设备:

minicom -D "/dev/ttyUSB0"

现在在我的目标设备上,我需要使用此cmd运行gdbserver:

gdbserver /dev/my_USB_serial_port my_Program

但是,我找不到ttyUSB0,我得到的是一堆ttyx(x是一个数字),如下所示:

~ # /dev/tty
tty    tty14  tty20  tty27  tty33  tty4   tty46  tty52  tty59  tty8
tty0   tty15  tty21  tty28  tty34  tty40  tty47  tty53  tty6   tty9
tty1   tty16  tty22  tty29  tty35  tty41  tty48  tty54  tty60  ttyS0
tty10  tty17  tty23  tty3   tty36  tty42  tty49  tty55  tty61  ttyS1
tty11  tty18  tty24  tty30  tty37  tty43  tty5   tty56  tty62
tty12  tty19  tty25  tty31  tty38  tty44  tty50  tty57  tty63
tty13  tty2   tty26  tty32  tty39  tty45  tty51  tty58  tty7

我怎么能找到哪个是我的USB端口正确的串口?

更新1:正如在答案中提到的就业俄语,我对USB端口感到困惑,但我仍然无法使用他的命令连接到gdbserver。

serial-port gdb remote-debugging gdbserver
1个回答
1
投票

但是,我找不到ttyUSB0

你很困惑 - 当然你不会在目标上找到ttyUSB0 - 目标没有任何插入其USB端口的东西。

在目标上,你想运行gdbserver - my_Program &,然后断开minicom,最后在主机上使用gdbtarget remote /dev/ttyUSB0

© www.soinside.com 2019 - 2024. All rights reserved.