Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Troubleshooting PyOCD Issues - KBA228421


Troubleshooting PyOCD Issues - KBA228421

Author: DheerajK_81           Version: **

Translation - Japanese: PyOCDの問題のトラブルシューティング - KBA228421 - Community Translated (JA)

This article addresses issues related to PyOCD encountered when debugging Mbed™ OS applications.

PyOCD is an open-source Python library used for programming and debugging microcontrollers using CMSIS-DAP.

Support for Cypress targets was added in PyOCD release 0.16.1. Therefore, you must have PyOCD version 0.16.1 or later to debug targets manufactured by Cypress. The list of supported platforms can be found on Mbed OS Cypress Partner page.

Run the following command from a terminal window to determine the version of PyOCD installed:

  • pyocd –-version

You may note the following errors in the command output:

(1) Error: Unsupported board found 1901


Reason: Using versions older than 0.16.1 will result in the following error; any connection to the target using gdb will fail.

Solution: Upgrade to the latest stable version of PyOCD using the command:

    • pip install -U pyocd


(2) Error: Operation not supported or unimplemented on this platform


Reason: You may be using PyOCD version 0.17.0. This bug was fixed in the newer versions.

Solution: Upgrade to latest stable version of PyOCD.

(3) Error: AttributeError: 'CY8C6xxA' object has no attribute 'options'


Reason: PyOCD version 0.21.0 reportedly has a bug in the Cypress target scripts.

Workaround: Update the files and located in the Python installation directory at the path: C:\Python\Lib\site-packages\pyocd\target\builtin\

Make the following changes in line 221 and 223 in


Make the following changes in line 412 and 414 in


Solution: This issue is fixed in PyOCD version 0.22.0. Upgrade to this version or later. To upgrade to specific versions, use the following command

    • pip install pyocd==0.22.0

(4) Error: Error in services launch sequenceStarting pyOCD GDB Server timed out.


Reason: The kit is not in DAPLink mode. PyOCD requires CMSIS-DAP support on the target, which is available on Cypress kits through DAPLink mode.

Solution: Use the firmware loader to upgrade KitProg3 to the latest version which supports DAPLink, and then switch the kit into DAPLink mode using the mode switch button.


Version history
Revision #:
1 of 1
Last update:
‎Sep 11, 2019 10:18 AM
Updated by: