How to use pyOCD for new target MCU like W7500

What about pyOCD

pyOCD is an Open Source python 2.7 based library for programming and debugging ARM Cortex-M microcontrollers using CMSIS-DAP. Linux, OSX and Windows are supported.

You can use the following interfaces:

 1. From a python interpretor:

  • halt, step, resume execution
  • read/write memory
  • read/write block memory
  • read-write core register
  • set/remove hardware breakpoints
  • flash new binary
  • reset

2. From a GDB client, you have all the features provided by gdb:

  • load a .elf file
  • read/write memory
  • read/write core register
  • set/remove hardware breakpoints
  • high level stepping

Fork mbedmicro/pyOCD repository and Installation

There are repository for pyOCD by mbedmicro.

www.life4iot.com_015

After then I issued this command for pyOCD installation. You can install from source by cloning the git repository and running

$ python setup.py install

For more information about pyOCD installation, Refer to this URL.

Added information and flash algorithm for W7500

I added flash algorithm and information for W7500 to python code of pyOCD project.

There are my commit log for adding W7500 target.

Currently, This project is review status by pull request of Github. So If you want use W7500 in pyOCD, please use this repository.

Self Test

After to add my target MCU as W7500, I did test using test script made by mbedmicro. If this test finished successfully, I think my target MCU is added normally.

This test script include read/write/erase test and register read/write test.

$ cd pyOCD/test/
$ sudo python automated_test.py
------ TEST RESULTS ------
Target         Test           Result         Time           

w7500          Basic Test     Pass           5.34418797493  
w7500          Speed Test     Pass           27.8010311127  
w7500          Cortex Test    Pass           6.81142616272  
w7500          Flash Test     Pass           131.791074038  

Test Time: 171.747846127
All tests passed

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s