Closed marcuschangarm closed 3 years ago
I have Python 3.7.4 , pyOCD 0.26 and I see the same thing.
Could it be something related to the dual-core?
I'm having similar issues. pyOCD: 0.26.0 Python: 3.7.3 OS: Windows 10 1909 Target: LPC55S69 Probe: DAPLink like
pyocd output:
pyocd gdb -t lpc55s69
0000470:INFO:board:Target type is lpc55s69
0000492:INFO:dap:DP IDR = 0x6ba02477 (v2 rev6)
0000502:INFO:ap:AP#0 IDR = 0x84770001 (AHB-AP var0 rev8)
0000509:INFO:ap:AP#1 IDR = 0x84770001 (AHB-AP var0 rev8)
0000518:INFO:ap:AP#2 IDR = 0x002a0000 (proprietary)
0000524:INFO:rom_table:AP#0 Class 0x1 ROM table #0 @ 0xe00fe000 (designer=015 part=000)
0000528:INFO:rom_table:[0]<e00ff000:ROM class=1 designer=43b part=4c9>
0000528:INFO:rom_table: AP#0 Class 0x1 ROM table #1 @ 0xe00ff000 (designer=43b part=4c9)
0000533:INFO:rom_table: [0]<e000e000:SCS-M33 class=9 designer=43b part=d21 devtype=00 archid=2a04 devid=0:0:0>
0000554:INFO:rom_table: [1]<e0001000:DWT class=9 designer=43b part=d21 devtype=00 archid=1a02 devid=0:0:0>
0000559:INFO:rom_table: [2]<e0002000:BPU class=9 designer=43b part=d21 devtype=00 archid=1a03 devid=0:0:0>
0000563:INFO:rom_table: [3]<e0000000:ITM class=9 designer=43b part=d21 devtype=43 archid=1a01 devid=0:0:0>
0000567:INFO:rom_table:[1]<e0040000:TPIU-M33 class=9 designer=43b part=d21 devtype=11 archid=0000 devid=ca0:0:0>
0000617:INFO:rom_table:AP#1 Class 0x1 ROM table #0 @ 0xe00fe000 (designer=015 part=000)
0000660:INFO:rom_table:[0]<e00ff000:ROM class=1 designer=43b part=4c9>
0000666:INFO:rom_table: AP#1 Class 0x1 ROM table #1 @ 0xe00ff000 (designer=43b part=4c9)
0000680:INFO:rom_table: [0]<e000e000:SCS-M33 class=9 designer=43b part=d21 devtype=00 archid=2a04 devid=0:0:0>
0000682:INFO:rom_table: [1]<e0001000:DWT class=9 designer=43b part=d21 devtype=00 archid=1a02 devid=0:0:0>
0000684:INFO:rom_table: [2]<e0002000:BPU class=9 designer=43b part=d21 devtype=00 archid=1a03 devid=0:0:0>
0000686:INFO:rom_table: [3]<e0000000:ITM class=9 designer=43b part=d21 devtype=43 archid=1a01 devid=0:0:0>
0000688:INFO:rom_table:[1]<e0040000:TPIU-M33 class=9 designer=43b part=d21 devtype=11 archid=0000 devid=ca0:0:0>
0000689:INFO:cortex_m_v8m:CPU core #0 is Cortex-M33 r0p3 (security ext present)
0000691:INFO:cortex_m:FPU present: FPv5-SP
0000694:INFO:cortex_m_v8m:CPU core #1 is Cortex-M33 r0p3
0000698:INFO:dwt:4 hardware watchpoints
0000699:INFO:fpb:8 hardware breakpoints, 1 literal comparators
0000704:INFO:dwt:4 hardware watchpoints
0000705:INFO:fpb:8 hardware breakpoints, 1 literal comparators
0000715:INFO:server:Semihost server started on port 4444 (core 0)
0000716:INFO:gdbserver:GDB server started on port 3333 (core 0)
Exception in thread gdb-server-core0:
Traceback (most recent call last):
File "C:\python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\python37\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 272, in run
self.target.halt()
File "C:\python37\lib\site-packages\pyocd\coresight\cortex_m.py", line 683, in halt
self.write_memory(CortexM.DHCSR, CortexM.DBGKEY | CortexM.C_DEBUGEN | CortexM.C_HALT)
File "C:\python37\lib\site-packages\pyocd\coresight\cortex_m.py", line 640, in write_memory
self.ap.write_memory(addr, value, transfer_size)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 540, in _write_memory
self.write_reg(MEM_AP_TAR, addr)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 512, in write_reg
super(MEM_AP, self).write_reg(addr, data)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 241, in write_reg
self.dp.write_ap((self.ap_num << APSEL_SHIFT) | addr, data)
File "C:\python37\lib\site-packages\pyocd\coresight\dap.py", line 402, in write_ap
self.probe.write_ap(addr, data)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 325, in write_ap
self._select_ap(addr)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 295, in _select_ap
self.write_dp(self.DP_SELECT, select)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 280, in write_dp
self._link.write_reg(reg_id, data)
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 786, in write_reg
self._write(dap_index, 1, request, [value])
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 964, in _write
size = cmd.get_request_space(size_to_transfer, transfer_request, dap_index)
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 217, in get_request_space
assert self._data_encoded is False
AssertionError
0000719:INFO:server:Semihost server started on port 4445 (core 1)
0000722:INFO:gdbserver:GDB server started on port 3334 (core 1)
Exception in thread gdb-server-core1:
Traceback (most recent call last):
File "C:\python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\python37\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 272, in run
self.target.halt()
File "C:\python37\lib\site-packages\pyocd\coresight\cortex_m.py", line 683, in halt
self.write_memory(CortexM.DHCSR, CortexM.DBGKEY | CortexM.C_DEBUGEN | CortexM.C_HALT)
File "C:\python37\lib\site-packages\pyocd\coresight\cortex_m.py", line 640, in write_memory
self.ap.write_memory(addr, value, transfer_size)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 540, in _write_memory
self.write_reg(MEM_AP_TAR, addr)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 512, in write_reg
super(MEM_AP, self).write_reg(addr, data)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 142, in _locking
return func(self, *args, **kwargs)
File "C:\python37\lib\site-packages\pyocd\coresight\ap.py", line 241, in write_reg
self.dp.write_ap((self.ap_num << APSEL_SHIFT) | addr, data)
File "C:\python37\lib\site-packages\pyocd\coresight\dap.py", line 402, in write_ap
self.probe.write_ap(addr, data)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 325, in write_ap
self._select_ap(addr)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 295, in _select_ap
self.write_dp(self.DP_SELECT, select)
File "C:\python37\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 280, in write_dp
self._link.write_reg(reg_id, data)
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 786, in write_reg
self._write(dap_index, 1, request, [value])
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 964, in _write
size = cmd.get_request_space(size_to_transfer, transfer_request, dap_index)
File "C:\python37\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 217, in get_request_space
assert self._data_encoded is False
AssertionError
I can confirm that I have also had this issue on the Musca s1, and that it works correctly after a downgrade to pyocd 0.25.0
@flit can you investigate or recommend the right person to investigate? Looks like there is a problem reported on multiple targets on release 0.26.0.
@marcuschangarm @Quincy-Zh @maclobdell Is this issue still relevant? I've tested with different PSoC6 flavors and I can not reproduce it with latest pyOCD master.
@bohdan-tymkiv I haven't used the PSOC in awhile. Let's close it if you can't reproduce it.
I'm getting the error below when I try to connect to CY8CPROTO-062-4343W.
pyOCD: 0.26.0 Python: 3.6.9 OS: Ubuntu 18.04.4 LTS