您的位置:首页 > 博客中心 > 数据库 >

jLink(v8)GDB 命令总结

时间:2022-03-14 03:53

/** ****************************************************************************** * @author    Maoxiao Hu * @version   V1.0.0 * @date       Dec-2014 ****************************************************************************** * < COPYRIGHT 2014 ISE of SHANDONG UNIVERSITY > ****************************************************************************** **/   当我们使用jLink调试Cortex-A9及以下核心的时候,往往会使用eclipse CDT+GDB插件+GDB Server的形式调试程序。 下面罗列一下jLink支持的GDB命令,来源于Segger公司的UM08001_JLink.pdf,在这里精简,以供备忘。 gxlsystem.com,布布扣

Note1: The remote commands are case-insensitive.

Note2: Optional parameters are set into square brackets.

Note3: The examples are described as follows:

The maximum length for <ArgumentString> is 512 characters.

Example

     > monitor setargs test 0 1 2 arg0=4

     < Arguments: test 0 1 2 arg0=4

 

3.3.3.24 setbp

Syntax

setbp <Addr> [<Mask>]

Description

Sets an instruction breakpoint at the given address, where <Mask> can be 0x03 for ARM instruction breakpoints (Instruction width 4 Byte, mask out lower 2 bits) or 0x01 for THUMB instruction breakpoints (Instruction width 2 Byte, mask out lower bit). If no mask is given, an ARM instruction breakpoint will be set.

Example

     #Set a breakpoint (implicit for ARM instructions)

     > monitor setbp 0x00000000

     #Set a breakpoint on a THUMB instruction

     > monitor setbp 0x00000100 0x01

 

3.3.3.25 sleep

Syntax

sleep <Delay>

Description

Sleeps for a given time, where <Delay> is the time period in milliseconds to delay. While sleeping any communication is blocked until the command returns after the given period.

Example

     > monitor sleep 1000

     < Sleep 1000ms

 

3.3.3.26 speed

Note: Deprecated. For setting the initial connection speed, use command line option -speed instead.

Syntax

speed <kHz>|auto|adaptive

Description

Sets the JTAG speed of J-Link / J-Trace. Speed can be either fixed (in kHz), automatic recognition or adaptive. In general, Adaptive is recommended if the target has an RTCK signal which is connected to the corresponding RTCK pin of the device (S-cores only). For detailed information about the different modes, refer to JTAG Speed on page 146.

The speed has to be set after selecting the interface, to change it from its default value.

Example

     > monitor speed auto

     < Select auto target interface speed (8000 kHz)

     > monitor speed 4000

     < Target interface speed set to 4000 kHz

     > monitor speed adaptive

     < Select adaptive clocking instead of fixed JTAG speed

 

3.3.3.27 step

Syntax

step [<NumSteps>]

or

si [<NumSteps>]

Description

Performs one or more single instruction steps, where <NumSteps> is the number of instruction steps to perform. If <NumSteps> is not specified only one instruction step will be performed.

Example

     > monitor step 3

 

注:SWO命令暂不使用,因为我的板子时JTAG接口。

热门排行

今日推荐

热门手游