How to use GDB environment on Eclipse with pyOCD

Posted by 카이젠8501 카이젠8501
2015.10.08 15:12 IT 개발/mbed

How to use GDB environment on Eclipse with pyOCD

Environment

Target : WIZwiki_w7500
OS : Linux Mint
Kernel : 3.15.8-031508

featured image

Setting for pyOCD

Download pyOCD and install

refer to this document.

Run pyOCD gdb server script

$ sudo python test/gdb_test.py 
[sudo] password for kaizen: 
INFO:root:Waiting for a USB device connected
INFO:root:new board id detected: 22010203066B9E1CFB9743E5
INFO:root:board allows 1 concurrent packets
INFO:root:DAP SWD MODE initialised
INFO:root:IDCODE: 0xBB11477
INFO:root:4 hardware breakpoints, 0 literal comparators
INFO:root:CPU core is Cortex-M0
INFO:root:2 hardware watchpoints
INFO:root:GDB server started at port:3333

GNU ARM Eclipse

Plugins install

For more information, Refer to this URL.

Setting debug option

[Run]-[Debug Configurations]-[GDB Hardware Debugging]-[New Project]-[Main]

www.life4iot.com_010

changed GDB Command for using GNU ARM tools.
[Debug Configurations]-[Debugger] and setting for remote target.

www.life4iot.com_012

Setting to “Start up” tap as below.

www.life4iot.com_013

Run Debug

If GDB server and GDB client on Eclipse are run nomarlly, Your firmware will be break on your break point which you were selected.

www.life4iot.com_014


저작자 표시
신고
Tags
이 댓글을 비밀 댓글로

How to use pyOCD for new target MCU like W7500

Posted by 카이젠8501 카이젠8501
2015.10.08 15:11 IT 개발/mbed

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

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


저작자 표시
신고
Tags
이 댓글을 비밀 댓글로