我目前正在研究 NXP i.MX8M Mini 内的 ARM Cortex-M4。我能够在 Ubuntu VM 上的 Eclipse IDE 上为 M4 编译一个项目。我现在想通过仍然来自 Ubuntu 的 SEGGER Flasher ARM 探针在 M4 上进行调试。
我的探针很容易被 Ubuntu 识别,我只需键入以下命令即可启动 J-Link GDB 服务器:
$ sudo ./JLinkGDBServerCLExe
但是,如果我在没有 sudo 的情况下键入相同的命令,我会得到:
$ ./JLinkGDBServerCLExe
SEGGER J-Link GDB Server V7.58b Command Line Version
JLinkARM.dll V7.58b (DLL compiled Nov 16 2021 15:04:27)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: Unspecified
Target interface: JTAG
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
Connecting to J-Link failed. Connected correctly?
GDBServer will be closed...
Shutting down...
Could not connect to J-Link.
Please check power, connection and settings.
我的问题是,当我启动 eclipse 时,我得到的结果与在没有 sudo 的情况下启动 GDB 服务器相同。这似乎是一个权利问题,我该如何解决?