How to use pyOCD for new target MCU like W7500 본문

IT 개발/mbed

How to use pyOCD for new target MCU like W7500

카이젠8501 카이젠8501 2015.10.08 15:11

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.

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

$ python 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.

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
------ 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

, ,
댓글쓰기 폼