PyOCD

From ElectroDragon Wiki
Revision as of 02:15, 4 January 2020 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

(DAPLINK or CMSIS-DAP) PyOCD

  • Install - pip install --pre -U pyocd
Pyocd-erase-nrf52832.png
  • Old commands
# -se 表示只擦除需要用到的区域
$ pyocd-flashtool -t nrf52 -se your-hex-file.hex
# 如果需要整片擦除,可以使用 -ce 参数
$ pyocd-flashtool -t nrf52 -ce your-hex-file.hex
# 如果只是想擦除,不编程,可以不带hex文件参数
$ pyocd-flashtool -t nrf52 -ce
  • New commands
pyocd list can list devices
C:\Users\Administrator>pyocd list
 #   Probe               Unique ID

 0   micro:bit [nrf51]   990000001c89c6d500000000000000000000000097969902

Flash for NRF52832 from SDK

  • nrf/examples/peripheral/blinky/pca10040/blank/armgcc/_build# pyocd flash -t NRF52 nrf52832_xxaa.hex

Ease chip and flash

  • pyocd flash -e chip -t nrf52 feather_nrf52832_bootloader-0.2.13_s132_6.1.1.hex

Flash for NRF52840 from SDK

  • pyocd flash -t NRF52840 ./_build/nrf52840_xxaa.hex