After installation of OpenOCD
http://blog.youkuaiyun.com/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:
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.

本文介绍了如何在Windows环境下利用OpenOCD与GDB Server进行STM32微控制器的远程调试,包括设置OpenOCD GDB服务器、配置IAR调试环境、以及通过本地主机地址连接进行调试的全过程。此教程适用于STM32开发人员,旨在提高开发效率并优化调试体验。
5057

被折叠的 条评论
为什么被折叠?



