您的位置:首页 > 运维架构

OpenOCD- Jlink&IAR via GDB Server

2012-04-03 20:25 204 查看
After installation of OpenOCD

/article/8505288.html

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:



Step2: IAR Setting

open a IAR Project, then make the projects.

choose project>Options>Debugger

select GDB Server,



then



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

so why is 3333? we check it out.



openocd use the tcp port 3333.

Step3 Debugging

then start debugging: Project>Download> Debug

check it again:



It proves what is GDB server.

Done. It is a little slower than using jlink directly.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: