Chinaunix首页 | 论坛 | 博客
  • 博客访问: 646930
  • 博文数量: 194
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 884
  • 用 户 组: 普通用户
  • 注册时间: 2015-09-21 16:48
文章分类

全部博文(194)

文章存档

2023年(1)

2022年(3)

2021年(16)

2020年(4)

2019年(5)

2018年(10)

2017年(72)

2016年(36)

2015年(47)

我的朋友

分类: 嵌入式

2017-09-14 15:37:52

JLINK v8命令集

几个常用命令:

  usb--------连接目标板
  r----------重启目标板
  halt-------停止cpu运行的程序
  loadbin----加载可执行的二进制文件
  g----------跳到代码段地址执行
  s----------单步执行(调试用)
  setpc-----设置pc寄存器的值(调试用)
  setbp-----设置断点
  Regs-------读寄存器组织
  wreg-------写寄存器
  mem--------读内存
  w4---------写内存
  power off mmu---关闭mmu,这个对于裸板调试很重要
  w4 cpsr,0x0000001f------切换到系统模式
  speed------设置jtag的传输速率
  rce 0,c0,c0,0-----设置cp15寄存器的第1个寄存器为0




详细介绍
----------------------
f          Firmware info(显示固件信息)

h          halt(暂停CPU)
g          go(运行)
Sleep      Waits the given time (in milliseconds). Syntax: Sleep (睡眠多少毫秒)
s          Single step the target chip(单步调试目标芯片)
st         Show hardware status(显示硬件状态)
hwinfo     Show hardware info(显示硬件信息)
mem        Read memory. Syntax: mem  , (hex)(读内存)
mem8       Read  8-bit items. Syntax: mem8  , (hex)(读内存8字节)
mem16      Read 16-bit items. Syntax: mem16 , (hex)mem32      Read 32-bit items. Syntax: mem32 , (hex)
w1         Write  8-bit items. Syntax: w1 , (hex)(写内存8字节)
w2         Write 16-bit items. Syntax: w2 , (hex)(读内存16字节)
w4         Write 32-bit items. Syntax: w4 , (hex)(读内存32字节)
wm         Write test words. Syntax: wm
is         Identify length of scan chain select register
ms         Measure length of scan chain. Syntax: ms
mr         Measure RTCK react time. Syntax: mr
q          Quit(推出)
qc         Close JLink connection and quit(关闭jlink连接,并退出)
r          Reset target         (RESET)(重启目标)
rx         Reset target         (RESET). Syntax: rx (延时重启)
RSetType   Set the current reset type. Syntax: RSetType
Regs       Display contents of registers(显示寄存器信息)
wreg       Write register.   Syntax: wreg , (写继承器)
SetBP      Set breakpoint.   Syntax: SetBP [A/T] [S/H](设置断点)
SetWP      Set Watchpoint. Syntax: [R/W] [ [] [A-Mask]](设置监视点)
ClrBP      Clear breakpoint. Syntax: ClrBP  (清除断点)
ClrWP      Clear watchpoint. Syntax: ClrWP  (清楚监视点)
VCatch     Write vector catch. Syntax: VCatch
loadbin    Load binary file into target memory.(下载bin文件到目标内存)
             Syntax: loadbin ,
savebin    Saves target memory into binary file.(保存BIN文件)
             Syntax: savebin , ,
SetPC      Set the PC to specified value. Syntax: SetPC (设置PC(r15)寄存器)
le         Change to little endian mode(设置成小端模式)
be         Change to big endian mode(设置成大端模式)
log        Enables log to file.  Syntax: log
unlock     Unlocks a device. Syntax: unlock
           Type unlock without to get a list
           of supported device names.
           nRESET has to be connected
---- CP15 ------------
rce        Read CP15.  Syntax: rce , , , (读CP15)
wce        Write CP15. Syntax: wce , , , , (写CP15)
---- ICE -------------
Ice        Show state of the embedded ice macrocell (ICE breaker)
ri         Read Ice reg.  Syntax: ri (hex)
wi         Write Ice reg. Syntax: wi , (hex)
---- ETM -------------
etm        Show ETM status
re         Read ETM reg.  Syntax: re
we         Write ETM reg. Syntax: we , (hex)
es         Start trace
---- ETB -------------
etb        Show ETB status
rb         Read ETB register.  Syntax: rb
wb         Write ETB register. Syntax: wb , (hex)
---- TRACE -----------
TAddBranch TRACE - Add branch instruction to trace buffer. Paras:,
TAddInst   TRACE - Add (non-branch) instruction to trace buffer. Syntax:
TClear     TRACE - Clear buffer
TSetSize   TRACE - Set Size of trace buffer
TSetFormat TRACE - SetFormat
TSR        TRACE - Show Regions (and analyze trace buffer)
TStart     TRACE - Start
TStop      TRACE - Stop
---- SWO -------------
SWOSpeed   SWO - Show supported speeds
SWOStart   SWO - Start
SWOStop    SWO - Stop
SWOStat    SWO - Display SWO status
SWORead    SWO - Read and display SWO data
SWOShow    SWO - Read and analyze SWO data
SWOFlush   SWO - Flush data
---- File I/O --------
fwrite     Write file to emulator
fread      Read file from emulator
fshow      Read and display file from emulator
fdelete    Delete file on emulator
fsize      Display size of file on emulator
---- Test ------------
thg        Run go/halt 1000 times
ts         Run step 1000 times
testwspeed Test download speed.   Syntax: testwspeed [ []]
testrspeed Test upload speed.     Syntax: testrspeed [ [] [ s>]]
testcspeed Test CPU speed.        Syntax: testcspeed []
---- JTAG ------------
Config     Set number of IR/DR bits before ARM device.
             Syntax: Config ,
speed      Set JTAG speed. Syntax: speed |auto|adaptive, e.g. speed 2000,
speed a
i          Read JTAG Id (Host CPU)
wjc        Write JTAG command (IR). Syntax: wjc (hex)
wjd        Write JTAG data (DR). Syntax: wjd (hex), (dec)
RTAP       Reset TAP Controller using state machine (111110)
wjraw      Write Raw JTAG data. Syntax: wjraw , ,
rt         Reset TAP Controller (nTRST)
---- JTAG-Hardware ---
c00        Create clock with TDI = TMS = 0
c          Clock
0          Clear TDI
1          Set   TDI
t0         Clear TMS
t1         Set   TMS
trst0      Clear TRST
trst1      Set   TRST
r0         Clear RESET
r1         Set   RESET
---- Connection ------
usb        Connect to J-Link via USB.  Syntax: usb , where port is 0..3
ip         Connect to J-Link ARM Pro or J-Link TCP/IP Server via TCP/IP.
           Syntax: ip
---- Configuration ---
si         Select target interface. Syntax: si ,
           where 0=JTAG and 1=SWD.
power      Switch power supply for target. Syntax: power [perm],
           where State is either On or Off. Example: power on perm
wconf      Write configuration byte. Syntax: wconf ,
rconf      Read configuration bytes. Syntax: rconf
usbaddr    Assign usb address to the connected J-Link: Syntax: usbaddr =
ipaddr     Show/Assign IP address and subnetmask of/to the connected J-Link.
gwaddr     Show/Assign network gateway address of/to the connected J-Link.
dnsaddr    Show/Assign network DNS server address of/to the connected J-Link.
conf       Show configuration of the connected J-Link.
ecp        Enable the  J-Link control panel.
calibrate  Calibrate the target current measurement.
selemu     Select a emulator to communicate with,
           from a list of all emulators which are connected to the host
           The interfaces to search on, can be specified
             Syntax: selemu [ ...]
ShowEmuList Shows a list of all emulators which are connected to the host.
            The interfaces to search on, can be specified.
             Syntax: ShowEmuList [ ...]
----------------------
NOTE: Specifying a filename in command line
will start J-Link Commander in script mode.


阅读(1484) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~