首页 > 其他分享 >【Jlink】J-Link Commander 命令行脚本使用例子 下载烧录 芯片解锁 芯片加锁

【Jlink】J-Link Commander 命令行脚本使用例子 下载烧录 芯片解锁 芯片加锁

时间:2022-10-31 23:32:12浏览次数:96  
标签:---- 烧录 加锁 芯片 hex Syntax Write Read Set


下载烧录:

  1. 创建download.bat,将下面内容放入,并根据实际情况填写JLink.exe路径、设备名称
set PATH=D:/Keil_v5/Arm/Segger/; 
JLink.exe -autoconnect 1 -device CX32L003 -if swd -speed 4000 -commandfile .\Burn\download.jlink
  1. 创建download.jlink,将下面内容放入,
    bin文件格式:loadfile 文件路径 0x0
    Hex文件格式:loadfile 文件路径
reset
erase
loadfile 文件路径 0x0
r
qc

注:加入这句话可以加密芯片

SecureArea Create

芯片解锁 需要掉电,才能生效

  1. 创建unlock.bat,将下面内容放入,并根据实际情况填写JLink.exe路径、设备名称
set PATH=D:/Keil_v5/Arm/Segger/; 
JLink.exe -autoconnect 1 -device CX32L003 -if swd -speed 4000 -commandfile .\Burn\unlock.jlink
  1. 创建unlock.jlink,将下面内容放入,
unlock kinetis
SecureArea Remove
reset
erase
r
qc

其他
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
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)
mem16 Read 16-bit items. Syntax: mem16 , (hex)
mem32 Read 32-bit items. Syntax: mem32 , (hex)
w1 Write 8-bit items. Syntax: w1 , (hex)
w2 Write 16-bit items. Syntax: w2 , (hex)
w4 Write 32-bit items. Syntax: w4 , (hex)
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
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.
Syntax: loadbin ,
savebin Saves target memory into binary file.
Syntax: savebin , ,
SetPC Set the PC to specified value. Syntax: SetPC
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 , , ,
wce Write CP15. Syntax: wce , , , ,
---- 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.


标签:----,烧录,加锁,芯片,hex,Syntax,Write,Read,Set
From: https://blog.51cto.com/xuejianqiang/5811400

相关文章

  • AB153x(检测洛达芯片) 专治华强北
    关于洛达1562A几点说明第一人声降噪等于耳塞环境低频降噪接近正品混响降噪和正品差距很大所以推荐室内工作降噪可以入第二续航目前有6小时的但是是单麦正常......
  • nRF51烧录器
    依赖:nRFgoStudio、J-Link下载地址:nRFgoStudio链接:https://pan.baidu.com/s/1tEt2bBLz7D-fO2mKb85ifQ提取码:bvjgJ-Link:链接:https://pan.baidu.com/s/1SLWeIrz4oTLafiJH8......
  • [Telink][TLSR8251] [泰凌微]入门上手教程(IDE+SDK+烧录)
    相关下载​​IDE下载​​​​SDKV3.4.2.1_Patch_0001​​​​烧录工具下载​​一、IDE的使用必须以管理员身份运行必须安装到C:安装完毕后,开始下面的导入SDK。解压压缩包......
  • Next-key加锁规则
    一、行锁加锁规则在RR隔离级别,行锁的加锁规则:1、加锁原则:加锁的基本单元是next-keylock(前开后闭区间),且查找过程中访问的对象才会加锁2、等值查询next-keylock退化情况:(1......
  • M1芯片下运行Kubernetes
    买了一个新Mac,是M1芯片。本来想打算安装一下Minikube用来练习一下。(Minikube是一个本地安装的K8S集群,可以低成本学习)理想的步骤是按部就班: 1.安装brew /bin/bash-c......
  • 项目中加锁的一些真实应用场景
    使用Java进行web开发的项目中,时常会使用到加锁的场景。加锁的操作主要是为了防止某一个操作出现重复的情况导致数据混乱;或者是为了避免在进行某些复杂业务操作的时候,......
  • 防干扰LCD显示液晶驱动芯片VK2C21A/B/BA/C/D适用于智能电表/水表/气表/热能表等家用电
    概述:VK2C21是一个点阵式存储映射的LCD驱动器,可支持最大80点(20SEGx4COM)或者最大128点(16SEGx8COM)的LCD屏。单片机可通过I2C接口配置显示参数和读写显示数据,也可通过指令进入......
  • NFC刷卡芯片系列技术问题汇总
    继之前我们在《智能门锁》里有提到使用的几款13.56M刷卡芯片,本期我们先来讲讲13.56M标配版的几款芯片会遇到的一些常见问题解答。标配版有:SI522/SI522A/SI523;低配版有:CI5......
  • 「珠海泰芯」助力物联网发展,提供兼具连接、计算、感知功能WiFi芯片,
    此前,珠海泰芯刚刚完成过亿元的B轮融资。AIot芯片领域,融合芯片正成为趋势,以适应小到灯泡、保温杯、门铃,大到冰箱、空调、洗衣机都要联网实现智能化的万物互联需求。智能物联......
  • 芯片替代-存储-PCIE-WIFI技术分析
    芯片替代-存储-PCIE-WIFI技术分析参考文献链接https://mp.weixin.qq.com/s/ECjl9RlwtZ_WyJEFjPFb9Qhttps://mp.weixin.qq.com/s/U-csnmF5GBLJ-eDZ3YRy_ghttps://mp.wei......