下载烧录:

  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.

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

  1. 【译】使用Node.js创建命令行脚本工具

    通过本文将一步步带领你利用Node.js来创建命令行脚本工具.在我的职业生涯中已经写过了上百个 `Bash` 脚本,但我的 `Bash` 依然写得很糟糕,每一次我都不得不去查一些简单逻辑结构的语法.如 ...

  2. 使用Node.js创建命令行脚本工具

    在我的职业生涯中已经写过了上百个 Bash 脚本,但我的 Bash 依然写得很糟糕,每一次我都不得不去查一些简单逻辑结构的语法.如果我想通过 curl 或者 sed 来做一些事情,我也必须去查找 ma ...

  3. 使用 npm 制作命令行脚本工具(一)

    2019独角兽企业重金招聘Python工程师标准>>> 使用 npm 制作命令行脚本工具(一) 本文需要对 npm 有基本了解,并且安装了 node 和 npm,如果你对 npm 一 ...

  4. 命令行_Laravel-admin artisan 命令行脚本使用

    本文内容 laravel-admin创建命令行脚本 通过screen管理脚本执行 我们在使用laravel-admin做管理后台开始时难免会遇到需要使用脚本在后台跑一些任务的情况.laravel框架给 ...

  5. 【转】如何在命令行脚本中启动带参数的Windows服务

    我们有一个自己编写的Windows服务,我们希望该服务在启动时可以根据用户输入的参数实现不同的功能. 要实现这样的需求并不是很难,下面这个例子我用来示范如何编写该服务 1 using System; ...

  6. K66芯片解锁/J-link报错的解决思路

    错误呈现: 错误描述:Protection bytes in flash at add. 0x400 .0x40F indicate that readout protection is set. F ...

  7. ubuntu系统vim常用命令学习以及ubuntu软件下载安装

    文章目录 一.ubuntu系统vim常用命令学习 (一)进入进入vim编辑器的方式 (二)vi的三种工作方式 (三)退出vi的命令 (四)命令模式下的各种命令 1.光标移动命令 2.插入命令 3.删除 ...

  8. linux下常用命令wget进行整站下载

    一.Linux下的wget Linux系统中的wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,我们经常要下载一些软件或从远程服务器恢复备份到本地服务器.wget支持H ...

  9. linux 命令之电子书chm格式下载

    word模式看上去很累,后来想想还是转换为chm的电子书比较方便,好查找命令 收集了318条命令 有喜欢的就来下载哦 转载于:https://blog.51cto.com/ncwcl/201487

最新文章

  1. BZOJ3261 最大异或和 解题报告(可持久化Trie树)
  2. Mongodb账号密码模式的基本认证
  3. 论文浅尝 | Convolutional 2D knowledge graph embedding
  4. 一个普通二叉树的遍历
  5. 【图像配准】基于matlab Harris+SIFT图像配准【含Matlab源码 1532期】
  6. html背景颜色渐变代码
  7. 【2019.05】JS逆向——破解百度翻译参数(sign)爬虫 超级详细
  8. 再谈微服务负载均衡器:Ribbon均衡器和SpringCloud自带LoadBalancer均衡器
  9. 中国唯一的图灵奖获得者姚期智,在清华开设的“姚班”有哪些 AI 名徒?
  10. 「数据集」医学图像数据集与竞赛大全
  11. 软件测试行业薪资排名第五!一线城市,月薪多少才够上了及格线?
  12. 入门级:GitHub和Git超超超详细使用教程!
  13. 不同层面禁用PUT、DELETE、HEAD、TRACE、OPTIONS请求方式
  14. webinspect安全扫描
  15. XiaoMi手机MIX 2S线刷固件和刷入Recovery、Root
  16. [翻译角]Headline English: A Captain Should Be Pitch Perfect at a Multitude of Skills (ESLPOD Blog)...
  17. Skype 2.0.0.63 for Linux
  18. 镜像文件大于4g 如何上传到服务器,【教程】如何用U盘安装大于4G的ISO镜像
  19. 麒麟系统更新yum源-最新(亲测可用)
  20. python超市售货系统_用Python实现简易超市售货系统

热门文章

  1. Ubuntu20.04修改MAC风格
  2. 软件构造--Chapter10-12小结
  3. 微信小程序-调用-腾讯视频-解决方案
  4. [leetcode]排列组合子集(python)
  5. linaro linaro-alip login: root (automatic login)
  6. Huggett (1993):非完全保险经济中异质性行为者的无风险利率,及其Matlab代码
  7. vscode开发微信小程序插件
  8. 多条件 if-else-if 语句
  9. 怦然心栋-冲刺日志(第3天)
  10. 程序员被狂虐的17种姿势,简直不要太过分!