7 months, 1 week ago.

Can I debug this board with pyOCD?

I have just seen that pyOCD supports stlinkv2 and installed version 0.14.3 using pip. I know that the board isn't supported directly, but wanted to try using GDB to debug code. However, when I try to start pyOCD using the generic cortex_m target I get an exception. Is this expected to be possible (and I'm missing something) or is this a non-starter?

The exception is as below:

0000830:INFO:board:Target type is cortex_m
0000846:INFO:dap:DP IDR = 0x2ba01477
0000857:ERROR:__main__:uncaught exception: 0
Traceback (most recent call last):
  File "/home/alan/Documents/mbed_test/lib/python3.6/site-packages/pyocd/", line 309, in run
  File "/home/alan/Documents/mbed_test/lib/python3.6/site-packages/pyocd/", line 490, in do_commander
    PyOCDCommander(self._args, cmds).run()
  File "/home/alan/Documents/mbed_test/lib/python3.6/site-packages/pyocd/tools/", line 548, in run
    status = CORE_STATUS_DESC[]
  File "/home/alan/Documents/mbed_test/lib/python3.6/site-packages/pyocd/core/", line 270, in get_state
    return self.selected_core.get_state()
  File "/home/alan/Documents/mbed_test/lib/python3.6/site-packages/pyocd/core/", line 65, in selected_core
    return self.cores[self._selected_core]
KeyError: 0

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F401RET6 microcontroller.
Comment on this question

1 Answer

7 months, 1 week ago.

Hi I advice you to post the question in the github repo



You need to log in to post a question