繁体   English   中英

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

[英]Debugging arm-elf C code using Zylin in Eclipse CDT

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

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

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

并且我的OCD连接死于"Error: unexpected error -308"

在两种情况下,我都使用相同的OCD脚本。

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

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

load        filename.out
symbol-file filename.out

在Eclipse中,我将此脚本文件的内容复制到“调试配置|命令”中(我已经尝试了“'Initialize'Commands”和“'Run'Commands”框。我用load替换最后两行,并在“调试配置|主| C / C ++应用程序”框中指定filename.out

我将对有关如何使Zylin + Eclipse正常运行的任何建议表示感谢。 谢谢。

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

转到Eclipse,在Zylin Debug Configurations > Embedded Debug (Native)

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

调试器标签: GDB debugger = arm-elf-gdb ; GDB命令集= Standard 协议= 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

它对我大多数时间都有效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM