Difference between revisions of "PyOCD"

From ElectroDragon
Jump to navigation Jump to search
(Created page with "==== (DAPLINK or CMSIS-DAP) PyOCD ==== * Install - pip install --pre -U pyocd thumb|right * Old commands # -se 表示只擦除需要用到...")
 
 
(3 intermediate revisions by the same user not shown)
Line 18: Line 18:
 
   0  micro:bit [nrf51]  990000001c89c6d500000000000000000000000097969902
 
   0  micro:bit [nrf51]  990000001c89c6d500000000000000000000000097969902
  
* pyocd flash --target NRF52840 nrf*.hex
+
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
 
[[category: Flasher]]
 
[[category: Flasher]]

Latest revision as of 14:15, 3 January 2020

(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