stlink gdb server
来源:互联网 发布:手绘板画图软件 编辑:程序博客网 时间:2024/05/22 17:32
How to install the debugging components?
Contents
- 1Quicklinks
- 2Overview
- 3GDB client
- 3.1Non-GNU toolchains
- 4GDB server & drivers
- 5Alternate solutions
- 6OpenSDA
- 7Eclipse debugging plug-ins
Quicklinks
If you know what you are doing, you can directly skip to:
- SEGGER J-Link install
- OpenOCD install
- QEMU install
Overview
When debugging ARM applications, generally two main components are required:
- a hardware JTAG/SWD probe
- several software components
The hardware probe can be either a separate device, connected via a flat cable to the debugged board, or, for many affordable discovery boards, can be directly integrated on the evaluation board, having a separate USB connector.
For several specific cases, the hardware probe is not mandatory, debugging being possible inside emulators, like QEMU.
As for software, debugging is generally a complex operation, and in Eclipse it requires multiple components:
- one or more Eclipse Debugging plug-ins
- the GDB debugger (client) application
- the GDB server application
- the hardware drivers required by the JTAG/SWD probe
The GNU MCU Eclipse project recommends three debugging solutions:
- the SEGGER J-Link probe & GDB server, as a highly professional solution, supporting both JTAG and SWD, plus SWO trace output;
- the OpenOCD application as an universal tool, supporting most cheap JTAG probes, but with limitations (currently it does not support SWD and implicitly no SWO, it is slower, configuration might be sometimes cryptical, there are many driver incompatibilities on Windows, etc);
- the GNU MCU Eclipse QEMU emulator, supporting several Cortex-M boards.
For an explanation why the SEGGER J-Link was selected, please go to the J-Link Debugging page and read the introduction section.
GDB client
The GDB client (GDB stands for GNU Debugger) is part of the GNU Toolchains, and is located in the same folder as all GNU toolchain binaries (compiler, linker, etc). The application name uses the same prefix/suffix as the compiler (for example, the debugger for embedded applications is arm-none-eabi-gdb).
To check if GDB is functional on your machine, use the following command (adjust the path for your system):
$ /usr/local/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gdb --versionGNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130913-cvs
The presence of a GDB as part of a GNU toolchain is mandatory, and it is recommended that the version of the GDB client matches the toolchain version. Generally only debugging .ELF applications is possible, and these applications must be compiled to include GNU compatible debugging information (like dwarf).
Non-GNU toolchains
Debugging applications generated by non-GNU toolchains (like the obsolete ARM CC), although not completely excluded, is not supported.
GDB server & drivers
For the GDB server, there are three recommended solutions, J-Link GDB Server,OpenOCD andQEMU. Detailed installation instructions are available in separate pages:
- SEGGER J-Link install
- OpenOCD install
- QEMU install
Normally if you already have a J-Link probe (or an OpenSDA J-Link compatible evaluation board), there is no absolute need to install OpenOCD, but it is sometimes useful to have a back-up solution in case you want to compare different behaviours, so the recommendation is to have both installed.
Similarly, if you do not have a J-Link (yet), there is no need to install the J-Link support at this moment; you can very well start your tests with OpenOCD alone. However, especially if your evaluation board has an integrated JTAG, once you overcome the initial apprentice status and want to use more advanced debug techniques, like SWO traces, or even want to debug your own boards, you will need an external JTAG, and in this case the recommended solution is to use J-Link.
Alternate solutions
J-Link and OpenOCD are not the only existing solutions, but probably are the most portable ones. J-Link is a single piece of hardware that can be used with most ARM processors. At the other end of the spectrum is OpenOCD, a single piece of software that, within limits, can be used with most JTAG probes, especially on GNU/Linux.
If portability is not your concern, and you prefer other GDB servers, please feel free to use them, but GNU MCU Eclipse plug-ins do not provide support from them.
To save you time, we compiled a list of other GDB servers, with some of their features and limitations:
- the original STM32 ST-Link Utility software, available from STM as part number STSW-LINK004, also implements a GDB server for the ST-LINK probes; runs on Windows only
- the stlink GDB server from texane, a GitHub project, implements the ST-LINK protocol; can be compiled from sources on GNU/Linux and macOS; on Windows can be compiled using Cygwin
- the CooCox GDB server; supports multiple JTAG probes; runs on Windows only
- the Atollic GDB server, part of the Atollic suite; the server seems to start separately, but attempts to connect to it fail, probably due to some protection checks
OpenSDA
Another interesting solution is Freescale’s OpenSDA debug/programming interface. For the Kinetis L based Freedom Development Boards, SEGGER provides a high performanceOpenSDA implementation fully compatible with the J-Link Lite, so the J-Link plug-in can be successfully used for these evaluation boards without having a physical J-Link probe. More details on installing OpenSDA can be found onMCU on Eclipse.
Eclipse debugging plug-ins
The debugging plug-ins come together with the other GNU MCU Eclipse plug-ins, and should be installed in the same step, detailed in the plug-ins install page.
Be sure you enable the entries named GNU ARM C/C++ J-Link Debugging, GNU ARM C/C++ OpenOCD Debugging and GNU ARM C/C++ QEMU Debugging.
Specific plug-in usage documentation is available from separate pages:
- J-Link plug-in
- OpenOCD plug-in
- QEMU plug-in
- stlink gdb server
- stlink-opencd-gdb调试程序
- Android安装GDB/GDB server
- Ti816x GDB Server 调试
- gdb server 远程调试
- gdb server 应用
- gdb+gdb Server安装配置zz
- GDB和GDB Server交叉调试
- gdb 如何制作(gdb target,gdb server)
- linux如何安装gdb-server
- stlink连接stm32
- ubunut安装stlink
- Ubuntu安装STLINK
- JTAC STLINK 接口
- jlink/stlink与ice
- STlink V2 烧录器使用
- 在嵌入式linux下用gdb server和gdb调试
- jlink gdb server with arm-none-eabi-gdb
- go下载被墙掉的第三方库
- [杂题 单调性]【NOIP2016】蚯蚓
- QAbstractItemView,QTableView
- [ 数据结构 ] DS线性表综合练习--数制转换
- java 面试问的问题和个人理解(三年)(一)
- stlink gdb server
- iCheck表单美化插件使用方法详解(含参数、事件等)
- HDU1520 Anniversary party 解题报告【树形DP】
- wps白色背景设置为淡绿色保护眼睛预防眼疲劳
- findContours函数报错:“将一个无效参数传递给了将无效参数视为严重错误的函数”解决方案之一
- 微信摇一摇周边设置
- TensorFlow 分布式集群 Local Server
- 使用git回滚之后,如何再滚回去
- wps怎么保存网页上的内容通过在线素材一键实现