Debugging with Eclipse and PyOCD: Uncaught Exception in pyocd.exe


Weber, Dominik <dominik.weber@...>
 

Hello there,

 

I’m new to Zephyr and having some trouble with debugging my application with PyOCD and Eclipse. I’m running a multithreaded application on a nRF52840 DK. I flash and want to debug the application via the onboard debugger on the DK. I followed the steps described in the tutorial: https://docs.zephyrproject.org/2.3.0/application/index.html#application in the section „Eclipse Debugging“.

 

I use:

·         Zephyr 2.3 Build 99

·         Segger J-Link OB-SAM3U128-V2-NordicSemi

·         Eclipse 2019-09

·         Python 3.8.3

·         West 0.7.2

·         C compiler GNU 9.2.1

 

All Python dependencies for Zephyr are satisfied.

 

When I try to debug the application via pyocd.exe or pyocd-gdbserver.exe I get the following error:

 

0001289:CRITICAL:__main__:uncaught exception: 'JLinkProbe' object has no attribute '_lock'

Traceback (most recent call last):

  File "c:\python38\lib\site-packages\pyocd\__main__.py", line 362, in run

    self._COMMANDS[self._args.cmd](self)

  File "c:\python38\lib\site-packages\pyocd\__main__.py", line 680, in do_gdbserver

    with session:

  File "c:\python38\lib\site-packages\pyocd\core\session.py", line 302, in __enter__

    self.open()

  File "c:\python38\lib\site-packages\pyocd\core\session.py", line 420, in open

    self._board.init()

  File "c:\python38\lib\site-packages\pyocd\board\board.py", line 85, in init

    self.target.init()

  File "c:\python38\lib\site-packages\pyocd\core\coresight_target.py", line 160, in init

    seq.invoke()

  File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 213, in invoke

    resultSequence.invoke()

  File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke

    resultSequence = call()

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 359, in power_up_debug

    self.write_reg(DP_CTRL_STAT, CSYSPWRUPREQ | CDBGPWRUPREQ | MASKLANE | TRNNORMAL)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 348, in write_reg

    self.write_dp(addr, data)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 528, in write_dp

    did_lock = self._set_dpbanksel(addr, True)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 480, in _set_dpbanksel

    self.lock()

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 252, in lock

    self.probe.lock()

  File "c:\python38\lib\site-packages\pyocd\probe\debug_probe.py", line 173, in lock

    self._lock.acquire()

AttributeError: 'JLinkProbe' object has no attribute '_lock'

 

Is this a bug in the python scripts or is the debugger not supported?

 

Thanks for your help!

 

Best Regards,

Dominik

 

Join users@lists.zephyrproject.org to automatically receive all group messages.