pyocd

一、安装
省略。
二、常用命令
刷hex文件

pyocd flash -t CY8C624AFNI-S2D43 ./cypress_flash.hex  --pack E:/pyocd_pack/Cypress.PSoC6_DFP.1.2.0.pack -f 5M

软件复位

pyocd reset -t CY8C624AFNI-S2D43 --method sw --pack E:/pyocd_pack/Cypress.PSoC6_DFP.1.2.0.pack

三、配置文件
在工程目录下新建文件名字"pyocd.yaml",则可以对默认的配置进行修改

# Global options
auto_unlock: false
frequency: 5000000 # Set 5 MHz SWD default for all probes
test_binary:     l1_cy8c6xxa.bin
target_override: cy8c6xxa
dap_protocol:   swd

swv_clock: 5000000

四、pyocd VS openocd
pyocd,支持型号极为广泛,速度较慢。
同一文件,使用jlink-v9,openocd可以90KB/S,pyocd只能10KB/S

pyocd测试结果:

$ pyocd flash -t CY8C624AFNI-S2D43 ./cypress_flash.hex  --pack E:/pyocd_pack/Cypress.PSoC6_DFP.1.2.0.pack -f 5M
0001401:INFO:load_cmd:Loading E:\WorkSpace\pyOCD\cypress_flash.hex
[---|---|---|---|---|---|---|---|---|----]
[========================================]
0219615:INFO:loader:Erased 2097152 bytes (8 sectors), programmed 2097152 bytes (4096 pages), skipped 0 bytes (0 pages) at 9.44 kB/s

openocd测试结果

***************************************
** Silicon: 0xE455, Family: 0x102, Rev.: 0x12 (A1)
** Detected Device: CY8C624AFNI-S2D43
** Detected Main Flash size, kb: 2048
** Flash Boot version: 3.1.0.378
** SFlash version: 292144
** Chip Protection: NORMAL
***************************************
Info : psoc6.cpu.cm4: hardware has 6 breakpoints, 4 watchpoints
Info : psoc6.cpu.cm4: external reset detected
Info : Listening on port 3333 for gdb connections
Info : Listening on port 3334 for gdb connections
adapter speed: 5000 kHz
Info : SWD DPIDR 0x6ba02477
target halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x000000e0 msp: 0x080ff800
** psoc6.cpu.cm4: Ran after reset and before halt...
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000012a msp: 0x080ff800
** Programming Started **
auto erase enabled
Info : Flash write discontinued at 0x100227c8, next section at 0x10025000
Info : Padding image section 0 at 0x100227c8 with 56 bytes (bank write end alignment)
[100%] [################################] [ Erasing     ]
[100%] [################################] [ Programming ]
Info : Padding image section 1 at 0x101eb1a4 with 92 bytes (bank write end alignment)
[100%] [################################] [ Erasing     ]
[100%] [################################] [ Programming ]
wrote 1870336 bytes from file ./build/CY8CPROTO-062-4343W_B20/Debug/SmartWatch.hex in 19.714502s (92.648 KiB/s)
** Programming Finished **

** Verify Started **
verified 1870188 bytes in 3.504242s (521.184 KiB/s)
** Verified OK **
** Resetting Target **
Info : SWD DPIDR 0x6ba02477
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

loveshipting

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值