Jlink 燒寫檔案到 nandflash norflash
阿新 • • 發佈:2019-01-01
JLINK v8命令集
Available commands are:
有效的命令如下:
(本人簡單翻譯了一下如有錯誤還請指出,謝謝各位網友)
----------------------
f Firmware info(顯示韌體資訊)
h halt(暫停CPU)
g go(執行)
Sleep Waits the given time (in milliseconds). Syntax: Sleep <delay>(睡眠多少毫秒)
s Single step the target chip(單步除錯目標晶片)
st Show hardware status(顯示硬體狀態)
hwinfo Show hardware info(顯示硬體資訊)
mem Read memory. Syntax: mem <Addr>, <NumBytes> (hex)(讀記憶體)
mem8 Read 8-bit items. Syntax: mem8 <Addr>, <NumBytes> (hex)(讀記憶體8位元組)
mem16 Read 16-bit items. Syntax: mem16 <Addr>, <NumItems> (hex)mem32 Read 32-bit items. Syntax: mem32 <Addr>, <NumItems> (hex)
w1 Write 8-bit items. Syntax: w1 <Addr>, <Data> (hex)(寫記憶體8位元組)
w2 Write 16-bit items. Syntax: w2 <Addr>, <Data> (hex)(讀記憶體16位元組)
w4 Write 32-bit items. Syntax: w4 <Addr>, <Data> (hex)(讀記憶體32位元組)
wm Write test words. Syntax: wm <NumWords>
is Identify length of scan chain select register
ms Measure length of scan chain. Syntax: ms <Scan chain>
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 <DelayAfterReset>(延時重啟)
RSetType Set the current reset type. Syntax: RSetType <type>
Regs Display contents of registers(顯示暫存器資訊)
wreg Write register. Syntax: wreg <RegName>, <Value>(寫繼承器)
SetBP Set breakpoint. Syntax: SetBP <addr> [A/T] [S/H](設定斷點)
SetWP Set Watchpoint. Syntax: <Addr> [R/W] [<Data> [<D-Mask>] [A-Mask]](設定監視點)
ClrBP Clear breakpoint. Syntax: ClrBP <BP_Handle>(清除斷點)
ClrWP Clear watchpoint. Syntax: ClrWP <WP_Handle>(清楚監視點)
VCatch Write vector catch. Syntax: VCatch <Value>
loadbin Load binary file into target memory.(下載bin檔案到目標記憶體)
Syntax: loadbin <filename>, <addr>
savebin Saves target memory into binary file.(儲存BIN檔案)
Syntax: savebin <filename>, <addr>, <NumBytes>
SetPC Set the PC to specified value. Syntax: SetPC <Addr>(設定PC(r15)暫存器)
le Change to little endian mode(設定成小端模式)
be Change to big endian mode(設定成大端模式)
log Enables log to file. Syntax: log <filename>
unlock Unlocks a device. Syntax: unlock <DeviceName>
Type unlock without <DeviceName> to get a list
of supported device names.
nRESET has to be connected
---- CP15 ------------
rce Read CP15. Syntax: rce <Op1>, <CRn>, <CRm>, <Op2>(讀CP15)
wce Write CP15. Syntax: wce <Op1>, <CRn>, <CRm>, <Op2>, <Data>(寫CP15)
---- ICE -------------
Ice Show state of the embedded ice macrocell (ICE breaker)
ri Read Ice reg. Syntax: ri <RegIndex>(hex)
wi Write Ice reg. Syntax: wi <RegIndex>, <Data>(hex)
---- ETM -------------
etm Show ETM status
re Read ETM reg. Syntax: re <RegIndex>
we Write ETM reg. Syntax: we <RegIndex>, <Data>(hex)
es Start trace
---- ETB -------------
etb Show ETB status
rb Read ETB register. Syntax: rb <RegIndex>
wb Write ETB register. Syntax: wb <RegIndex>, <Data>(hex)
---- TRACE -----------
TAddBranch TRACE - Add branch instruction to trace buffer. Paras:<Addr>,<BAddr>
TAddInst TRACE - Add (non-branch) instruction to trace buffer. Syntax: <Addr>
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 [<Addr> [<Size>]]
testrspeed Test upload speed. Syntax: testrspeed [<Addr> [<Size>] [<NumBlock
s>]]
testcspeed Test CPU speed. Syntax: testcspeed [<RAMAddr>]
---- JTAG ------------
Config Set number of IR/DR bits before ARM device.
Syntax: Config <IRpre>, <DRpre>
speed Set JTAG speed. Syntax: speed <freq>|auto|adaptive, e.g. speed 2000,
speed a
i Read JTAG Id (Host CPU)
wjc Write JTAG command (IR). Syntax: wjc <Data>(hex)
wjd Write JTAG data (DR). Syntax: wjd <Data32>(hex), <NumBits>(dec)
RTAP Reset TAP Controller using state machine (111110)
wjraw Write Raw JTAG data. Syntax: wjraw <NumBits(dec)>, <tms>, <tdi>
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 <port>, where port is 0..3
ip Connect to J-Link ARM Pro or J-Link TCP/IP Server via TCP/IP.
Syntax: ip <ip_addr>
---- Configuration ---
si Select target interface. Syntax: si <Interface>,
where 0=JTAG and 1=SWD.
power Switch power supply for target. Syntax: power <State> [perm],
where State is either On or Off. Example: power on perm
wconf Write configuration byte. Syntax: wconf <offset>, <data>
rconf Read configuration bytes. Syntax: rconf
usbaddr Assign usb address to the connected J-Link: Syntax: usbaddr = <addr>
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 [<Interface0> <Interface1> ...]
ShowEmuList Shows a list of all emulators which are connected to the host.
The interfaces to search on, can be specified.
Syntax: ShowEmuList [<Interface0> <Interface1> ...]
----------------------
NOTE: Specifying a filename in command line
will start J-Link Commander in script mode.
幾個常用命令:
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
Available commands are:
有效的命令如下:
(本人簡單翻譯了一下如有錯誤還請指出,謝謝各位網友)
----------------------
f Firmware info(顯示韌體資訊)
h halt(暫停CPU)
g go(執行)
Sleep Waits the given time (in milliseconds). Syntax: Sleep <delay>(睡眠多少毫秒)
s Single step the target chip(單步除錯目標晶片)
st Show hardware status(顯示硬體狀態)
hwinfo Show hardware info(顯示硬體資訊)
mem Read memory. Syntax: mem <Addr>, <NumBytes> (hex)(讀記憶體)
mem8 Read 8-bit items. Syntax: mem8 <Addr>, <NumBytes> (hex)(讀記憶體8位元組)
mem16 Read 16-bit items. Syntax: mem16 <Addr>, <NumItems> (hex)mem32 Read 32-bit items. Syntax: mem32 <Addr>, <NumItems> (hex)
w1 Write 8-bit items. Syntax: w1 <Addr>, <Data> (hex)(寫記憶體8位元組)
w2 Write 16-bit items. Syntax: w2 <Addr>, <Data> (hex)(讀記憶體16位元組)
w4 Write 32-bit items. Syntax: w4 <Addr>, <Data> (hex)(讀記憶體32位元組)
wm Write test words. Syntax: wm <NumWords>
is Identify length of scan chain select register
ms Measure length of scan chain. Syntax: ms <Scan chain>
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 <DelayAfterReset>(延時重啟)
RSetType Set the current reset type. Syntax: RSetType <type>
Regs Display contents of registers(顯示暫存器資訊)
wreg Write register. Syntax: wreg <RegName>, <Value>(寫繼承器)
SetBP Set breakpoint. Syntax: SetBP <addr> [A/T] [S/H](設定斷點)
SetWP Set Watchpoint. Syntax: <Addr> [R/W] [<Data> [<D-Mask>] [A-Mask]](設定監視點)
ClrBP Clear breakpoint. Syntax: ClrBP <BP_Handle>(清除斷點)
ClrWP Clear watchpoint. Syntax: ClrWP <WP_Handle>(清楚監視點)
VCatch Write vector catch. Syntax: VCatch <Value>
loadbin Load binary file into target memory.(下載bin檔案到目標記憶體)
Syntax: loadbin <filename>, <addr>
savebin Saves target memory into binary file.(儲存BIN檔案)
Syntax: savebin <filename>, <addr>, <NumBytes>
SetPC Set the PC to specified value. Syntax: SetPC <Addr>(設定PC(r15)暫存器)
le Change to little endian mode(設定成小端模式)
be Change to big endian mode(設定成大端模式)
log Enables log to file. Syntax: log <filename>
unlock Unlocks a device. Syntax: unlock <DeviceName>
Type unlock without <DeviceName> to get a list
of supported device names.
nRESET has to be connected
---- CP15 ------------
rce Read CP15. Syntax: rce <Op1>, <CRn>, <CRm>, <Op2>(讀CP15)
wce Write CP15. Syntax: wce <Op1>, <CRn>, <CRm>, <Op2>, <Data>(寫CP15)
---- ICE -------------
Ice Show state of the embedded ice macrocell (ICE breaker)
ri Read Ice reg. Syntax: ri <RegIndex>(hex)
wi Write Ice reg. Syntax: wi <RegIndex>, <Data>(hex)
---- ETM -------------
etm Show ETM status
re Read ETM reg. Syntax: re <RegIndex>
we Write ETM reg. Syntax: we <RegIndex>, <Data>(hex)
es Start trace
---- ETB -------------
etb Show ETB status
rb Read ETB register. Syntax: rb <RegIndex>
wb Write ETB register. Syntax: wb <RegIndex>, <Data>(hex)
---- TRACE -----------
TAddBranch TRACE - Add branch instruction to trace buffer. Paras:<Addr>,<BAddr>
TAddInst TRACE - Add (non-branch) instruction to trace buffer. Syntax: <Addr>
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 [<Addr> [<Size>]]
testrspeed Test upload speed. Syntax: testrspeed [<Addr> [<Size>] [<NumBlock
s>]]
testcspeed Test CPU speed. Syntax: testcspeed [<RAMAddr>]
---- JTAG ------------
Config Set number of IR/DR bits before ARM device.
Syntax: Config <IRpre>, <DRpre>
speed Set JTAG speed. Syntax: speed <freq>|auto|adaptive, e.g. speed 2000,
speed a
i Read JTAG Id (Host CPU)
wjc Write JTAG command (IR). Syntax: wjc <Data>(hex)
wjd Write JTAG data (DR). Syntax: wjd <Data32>(hex), <NumBits>(dec)
RTAP Reset TAP Controller using state machine (111110)
wjraw Write Raw JTAG data. Syntax: wjraw <NumBits(dec)>, <tms>, <tdi>
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 <port>, where port is 0..3
ip Connect to J-Link ARM Pro or J-Link TCP/IP Server via TCP/IP.
Syntax: ip <ip_addr>
---- Configuration ---
si Select target interface. Syntax: si <Interface>,
where 0=JTAG and 1=SWD.
power Switch power supply for target. Syntax: power <State> [perm],
where State is either On or Off. Example: power on perm
wconf Write configuration byte. Syntax: wconf <offset>, <data>
rconf Read configuration bytes. Syntax: rconf
usbaddr Assign usb address to the connected J-Link: Syntax: usbaddr = <addr>
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 [<Interface0> <Interface1> ...]
ShowEmuList Shows a list of all emulators which are connected to the host.
The interfaces to search on, can be specified.
Syntax: ShowEmuList [<Interface0> <Interface1> ...]
----------------------
NOTE: Specifying a filename in command line
will start J-Link Commander in script mode.
幾個常用命令:
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