Eclipse+Zylin+gdb+jlink gdb server错误

59 views
Skip to first unread message

徐立人

unread,
Mar 21, 2012, 11:21:37 PM3/21/12
to rt-threa...@googlegroups.com
hi all:

    小弟这两天在尝试使用Eclipse+gcc来对STM32F207VG进行调试。参照的wiki的步骤,只是在target处改了芯片型号。发现可下载,但不可调试。阅读了Jlink GDB Server User Guide以后在arm-none-eabi-gdb.exe里输入target remote localhost:2331可以连接上gdb server,并输入完脚本,顺利得进行了调试。但回到Eclipse似乎有一些奇怪的问题:

52-gdb-set confirm off
52^done
53-gdb-set width 0
(gdb) 
53^done
54-gdb-set height 0
(gdb) 
54^done
55-interpreter-exec console echo
(gdb) 
55^done
(gdb) 
56-gdb-show prompt
56^done,value="(gdb) "
(gdb) 
57 target remote localhost:2331
target remote localhost:2331
localhost: unknown host
localhost:2331: No such file or directory.
&"target remote localhost:2331\n"
&"localhost: unknown host\n"
&"localhost:2331: No such file or directory.\n"
57^error,msg="localhost:2331: No such file or directory."
(gdb) 
58 monitor flash device = STM32F207VG
monitor flash device = STM32F207VG
"monitor" command not supported by this target.
&"monitor flash device = STM32F207VG\n"
&"\"monitor\" command not supported by this target.\n"
58^error,msg="\"monitor\" command not supported by this target."
(gdb) 
59 monitor flash download = 1
&"monitor flash download = 1\n"
&"\"monitor\" command not supported by this target.\n"
59^error,msg="\"monitor\" command not supported by this target."
(gdb) 
monitor flash download = 1
"monitor" command not supported by this target.
60 monitor flash breakpoints = 1
&"monitor flash breakpoints = 1\n"
monitor flash breakpoints = 1
&"\"monitor\" command not supported by this target.\n"
60^error,msg="\"monitor\" command not supported by this target."
(gdb) 
"monitor" command not supported by this target.
61 monitor reset
&"monitor reset\n"
&"\"monitor\" command not supported by this target.\n"
monitor reset
"monitor" command not supported by this target.
61^error,msg="\"monitor\" command not supported by this target."
(gdb) 
62-gdb-exit
62^exit


似乎跑到Init脚本以后所有命令都不被认可了。在Jlink GDB Server上也没有连接上的迹象。请问有什么好的解决方法?

prife

unread,
Mar 21, 2012, 11:46:36 PM3/21/12
to rt-threa...@googlegroups.com
注意,你的目录是不是还有 .gdbinit文件? 是否完全按照wiki上的eclipse配置的呢?

有没有安装zylin插件? 并且使用zylin提供的初始化命令? 把你的zylin配置图贴一下吧。
--
把有限的时间投入到无限的学习中去

徐立人

unread,
Mar 22, 2012, 12:05:13 AM3/22/12
to rt-threa...@googlegroups.com
to prife:

木有.gdbinit诶,我又仔细核对了一下wiki的步骤和我的设置,应该没有问题。下面是截图


2012/3/22 prife <gop...@gmail.com>
Picked_20120322_3.png
Picked_20120322_1.png
Picked_20120322_2.png

prife

unread,
Mar 22, 2012, 12:15:11 AM3/22/12
to rt-threa...@googlegroups.com
看了下你的截图,试试如下步骤
1)保持zylin的命令跟 wiki上一致,我看了一下你的zylin的初始命令(你把设置大小端和速度的删除了,而且monitor reset也没有了)
你还是先跟wiki上一致,然后知修改device为 F2xxx再试试。如果还不行,试试2)

2)在使用eclipse +zylin调试之前,是否使用过命令行GDB?如果用过,请把这个工程删除,然后重新建工程,重新配置一下zylin调试。不要再用命令行gdb了。
(因为我以前先用gdb,可以调试,改用zylin死活不能调试,删除工程重新配置就可以了)

 
--
把有限的时间投入到无限的学习中去

徐立人

unread,
Mar 22, 2012, 2:50:08 AM3/22/12
to rt-threa...@googlegroups.com
我看了网上面的帖子。似乎和x64有关系,zylin似乎只支持32位系统?我的elipse环境都配的是64位的。。。估计这次是折腾不过去了。prife你用的是x86还是x64的?

2012/3/22 prife <gop...@gmail.com>



--
徐立人
http://www.google.com/profiles/xuliman

prife

unread,
Mar 22, 2012, 3:28:16 AM3/22/12
to rt-threa...@googlegroups.com
盗版win7 32bit,linux下未测试
eclipse 版本
Eclipse IDE for C/C++ Developers

Version: Helios Service Release 2
Build id: 20110218-0911

是在不行,那就gdb 命令行调试吧。 :-)  
--
把有限的时间投入到无限的学习中去

Grissiom

unread,
Mar 22, 2012, 3:34:50 AM3/22/12
to rt-threa...@googlegroups.com
64 位系统各种悲剧……

2012/3/22 prife <gop...@gmail.com>



--
Cheers,
Grissiom

prife

unread,
Mar 22, 2012, 3:40:33 AM3/22/12
to rt-threa...@googlegroups.com
让你们高帅富用4G大内存,用64bit系统,这下好了吧 

矮丑穷搓低调路过。。。。
--
把有限的时间投入到无限的学习中去
1E3.gif
360.gif

prife

unread,
Mar 22, 2012, 3:46:04 AM3/22/12
to rt-threa...@googlegroups.com
还是正经一点吧。

用命令行gdb的话,写一个.gdbinit文件,配置好也比较好用。反正大多数情况下 rt_kprintf够用了。实在需要在线调试就用gdb吧。
另,一定要设置一下 jlink gdb server的速度。默认是5kb,debug的时候会急死人的。
详细文件的写法可以参考 jlink 提供的gdb server pdf. 里面有你想要的全部东西。

--
把有限的时间投入到无限的学习中去

Grissiom

unread,
Mar 22, 2012, 3:56:03 AM3/22/12
to rt-threa...@googlegroups.com
2012/3/22 prife <gop...@gmail.com>

让你们高帅富用4G大内存,用64bit系统,这下好了吧 

矮丑穷搓低调路过。。。。


确实是 4G 内存,但是 windows 自带的是 32 位的,懒得换了。64 位的 Linux 上也遇到各种不爽,Windows 就更懒得换了……

也是矮丑穷搓,嘿嘿…… 不过现在内存都白菜价了,咬咬牙还是要加的~

--
Cheers,
Grissiom
1E3.gif
360.gif

徐立人

unread,
Mar 22, 2012, 5:08:59 AM3/22/12
to rt-threa...@googlegroups.com

好的~谢谢prife~不是那啥,只是舍不得浪费内存啦~

Reply all
Reply to author
Forward
0 new messages