在 Eclipse CDT 中使用 Zylin 调试 arm-elf C 代码

发布于 2024-09-15 04:09:29 字数 830 浏览 1 评论 0原文

我在 OS X 10.5.8 上使用 Eclipse CDT 和 Zylin 嵌入式调试(本机)和 arm-elf-gdb 6.6。 我有一个 OCD 调试器连接到带有 ARM 处理器的主板。

Eclipse 能够在第一个断点处停止并从内存中收集变量,但任何后续断点或单步都会失败。使用命令行 gdb 时,我可以设置断点,但是在完全相同的位置设置断点会在 Eclipse 中出现这些错误:

Warning:
Cannot insert breakpoint 2.
Error accessing memory address 0x3f6: Unknown error: -1.

并且我的 OCD 连接因 "Error: Unexpected error -308"

I'm using两种情况下都有相同的强迫症脚本。

我看到的唯一区别是 (1) Eclipse 使用 Zylin 和 mi 协议与 gdb 进行通信,以及 (2) 我的 gdb 脚本以不同的方式调用:

从 gdb 运行时,我使用以这两个结尾的脚本文件行:

load        filename.out
symbol-file filename.out

在 Eclipse 中,我将此脚本文件的内容复制到“调试配置 | 命令”中(我尝试了“‘初始化’命令”和“‘运行’命令”框。我将最后两行替换为 < code>load,并在“调试配置 | 主要 | C/C++ 应用程序”框中指定 filename.out

我将不胜感激有关如何让 Zylin+Eclipse 运行的任何建议 。 。 谢谢。

I'm using Eclipse CDT with Zylin embedded debug (native) and arm-elf-gdb 6.6 on OS X 10.5.8.
I've got an OCD debugger connecting to a board with an ARM processor.

Eclipse is able to stop at the first breakpoint and gather variables from memory, but any subsequent breakpoints or single-steps fail. I can set breakpoints ok when using commandline gdb, but setting breakpoints at the exact same location gives me these errors in Eclipse:

Warning:
Cannot insert breakpoint 2.
Error accessing memory address 0x3f6: Unknown error: -1.

And my OCD connection dies with "Error: unexpected error -308"

I'm using the same OCD script in both cases.

The only differences I see are (1) Eclipse uses Zylin and the mi protocol to talk to gdb, and (2) my gdb script is invoked differently in this way:

When running from gdb, I use a script file that ends with these two lines:

load        filename.out
symbol-file filename.out

In Eclipse, I copy the contents of this script file into "Debug Configurations | Commands" (I've tried both the "'Initialize' Commands" and "'Run' Commands" boxes. I replace the last two lines with load, and specify filename.out in the "Debug Configurations | Main | C/C++ Application" box.

I'd appreciate any suggestions about how to get Zylin+Eclipse to behave.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无风消散 2024-09-22 04:09:29

我在 LPC2103 上使用相同的解决方案。

转到 Eclipse,在 Zylin Debug Configurations > 中嵌入式调试(本机)

主选项卡: C/C++ 应用程序 = you_elf_file.elf

调试器选项卡: GDB 调试器 = arm-elf-gdb; GDB 命令集 = 标准;协议 = mi2

命令:

“初始化”命令:

target remote localhost:3333

monitor arm7_9 dcc_downloads enable
monitor arm7_9 fast_memory_access enable
monitor arm7_9 dbgrq enable

monitor reset halt
monitor wait_halt
monitor sleep 500
load

“运行”命令:

continue

我正在使用并行端口 Wiggler 和 OpenOCD [Open On-Chip Debugger 0.4.0] 以及安装附带的 cfgs:

openocd -f interface/parport.cfg -f target/lpc2103.cfg

它对我来说大部分时间都有效。

I'm using the same solution on a LPC2103.

Go to Eclipse, in Zylin Debug Configurations > Embedded Debug (Native):

Main tab: C/C++ Application = you_elf_file.elf

Debugger tab: GDB debugger = arm-elf-gdb; GDB command set = Standard; Protocol = mi2

Commands:

'Initialize' commands:

target remote localhost:3333

monitor arm7_9 dcc_downloads enable
monitor arm7_9 fast_memory_access enable
monitor arm7_9 dbgrq enable

monitor reset halt
monitor wait_halt
monitor sleep 500
load

'Run' commands:

continue

I'm using parallel port Wiggler and OpenOCD [Open On-Chip Debugger 0.4.0] with the cfgs that came with the installation:

openocd -f interface/parport.cfg -f target/lpc2103.cfg

It works most of the time for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文