OpenOCD- Jlink&IAR via GDB Server

梦里梦外; 2021-12-12 09:09 332阅读 0赞

After installation of OpenOCD

http://blog.csdn.net/iamlvshijie/article/details/7423611

we can test GCB Sever before development.

What is GDB Server?

from wikipedia:

gdbserver is a computer program that makes it possible to remotely debug other programs.[1] Running on the same system as the program to be debugged, it allows the GNU Debugger to connect from another system; that is, only the executable to be debugged needs to be resident on the target system, while the source code and a copy of the binary file to be debugged reside on the developer’s local computer. The connection can be either TCP or a serial line.

Step1: Run OpenOCD GDB Server

run your openocd, telling it you jtag interface and target like this, I write a bat file for windows.

@echo OpenOCD JLink GDBServer
c:
cd cygwin\openocd\tcl
openocd -f interface/jlink.cfg -f target/stm32f1x.cfg
pause

then I check the network connecting:

1333455597_2774.JPG

Step2: IAR Setting

open a IAR Project, then make the projects.

choose project>Options>Debugger

select GDB Server,

1333455479_5413.JPG

then

1333455503_9657.JPG

type localhost, 3333 //attention, there is a comma before 3333

so why is 3333? we check it out.

1333455597_2774.JPG

openocd use the tcp port 3333.

Step3 Debugging

then start debugging: Project>Download> Debug

check it again:

1333455591_4073.JPG

It proves what is GDB server.

Done. It is a little slower than using jlink directly.

转载于:https://www.cnblogs.com/iamlvshijie/archive/2012/04/03/2486193.html

发表评论

表情:
评论列表 (有 0 条评论,332人围观)

还没有评论,来说两句吧...

相关阅读

    相关 gdb

    `backtrace(简写为bt`命令查看函数调用的栈帧: `nfo(简写为i)`查看函数中局部变量的值: i locals 查看函数当前局部变量的值用`frame(简写为

    相关 gdb

    <table> <thead> <tr> <th align="left">命令</th> <th align="left">解释</th>

    相关 gdb

    本文介绍Linux下GDB调试器常用的基本命令。 测试均在Ubuntu12.10下完成。 先看看GDB调试的效果图: ![20130522144628921][]

    相关 GDB

    gdb调试命令的使用及总结 作者: 字体:\[增加 减小\] 类型:转载 时间:2013-05-04[ 我要评论][Link 1] gdb是一个在UNIX环境下的命令行