pyOCD failed to load "zephyr.elf"
Im trying to debug with pyocd and im getting this error
0/1] Debugging nrf52_blenano2 -- west debugserver: using runner pyocd -- runners.pyocd: pyOCD GDB server running on port 3333 0000515:INFO:board:Target type is nrf52 0000710:INFO:dap:DP IDR = 0x2ba01477 (v1 rev2) 0000797:INFO:ap:AP#0 IDR = 0x24770011 (AHB-AP var1 rev2) 0000874:INFO:ap:AP#1 IDR = 0x02880000 (proprietary) 0000879:INFO:target_nRF52:NRF52832 not in secure state 0000898:INFO:rom_table:AP#0 ROM table #0 @ 0xe00ff000 (designer=244 part=006) 0000910:INFO:rom_table:[0]<e000e000:SCS-M4 class=14 designer=43b part=00c> 0000920:INFO:rom_table:[1]<e0001000:DWT class=14 designer=43b part=002> 0000929:INFO:rom_table:[2]<e0002000:FPB class=14 designer=43b part=003> 0000939:INFO:rom_table:[3]<e0000000:ITM class=14 designer=43b part=001> 0000950:INFO:rom_table:[4]<e0040000:TPIU-M4 class=9 designer=43b part=9a1 devtype=11 archid=0000 devid=0:0:ca1> 0000958:INFO:rom_table:[5]<e0041000:ETM-M4 class=9 designer=43b part=925 devtype=13 archid=0000 devid=0:0:0> 0000964:INFO:cortex_m:CPU core #0 is Cortex-M4 r0p1 0000987:INFO:cortex_m:FPU present: FPv4-SP 0000996:INFO:dwt:4 hardware watchpoints 0001003:INFO:fpb:6 hardware breakpoints, 4 literal comparators 0001087:CRITICAL:main:uncaught exception: [Errno 98] Address already in use Traceback (most recent call last): File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/main.py", line 344, in run self._COMMANDSself._args.cmd File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/main.py", line 579, in do_gdbserver server_listening_callback=self.server_listening) File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/gdbserver/gdbserver.py", line 151, in init self.abstract_socket.init() File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/utility/sockets.py", line 33, in init self.listener.bind((self.host, self.port)) OSError: [Errno 98] Address already in use ERROR: command exited with status 1: pyocd gdbserver -p 3333 -T 4444 -t nrf52 FAILED: zephyr/cmake/flash/CMakeFiles/debugserver cd /home/zephyr/eclipse-workspace/SmartEggLite/build && /snap/cmake/252/bin/cmake -E env /home/zephyr/.local/bin/west debugserver --skip-rebuild ninja: build stopped: subcommand failed.
It is possible that a previous instance of pyocd was still running, occupying those ports. Or pyocd did not exit cleanly so the OS has a TIME_WAIT on those sockets. Did you perform a debugging session just before this happened? Maybe that debugging session was still in progress?
Im using DAPlink(USB) . this is my first debug , antyhing done before and i get always the same error. Can you provide with daplink config ? is there something in debug to set in order to get debug session work fine ?
I have never used DAPlink and don't have one to try. Could you try running west debug in command line? If it is still an issue there, it might be caused by the underlying cmake/west mechanisms and we can file a bug at the main Zephyr repo.
My Daplink is always at "/dev/ttyACM0" and when i open terminal view on eclipse, it tell me that port is closed. I verify if the port is realy closed and it's seem to be ok and any process have been attached to it. I think you should make bug on zephyr repos to correct this . i have always the same error