9 years, 1 month ago.

CMSIS-DAP Debugging and USBHID

Hi,

Started up trying debugging with Keil / uVision and CMSIS-DAP. Got everything working quite OK. Had some headache why my app stopped in the beginning - but found the info about semi-hosting calls - and removed "mbed-mac_address()" and other file-system calls and then it is running fine. Until I'm trying to debug what I have issues with - USBHID communication. Is USBHID communication ("hid.readNB()") also a semi-host call ?? The debugger gets disconnected at the very moment I'm trying to talk USB to the unit my normal way (over USBHId that is). The error message is: "AGDI Cortex-M: Cannot access target, Shutting down debug session." I do understand that running two USB connections (CMSIS-DAP over the built in USB and one over USBHId on pin P31/P32 could mess up - but could you explain why ?? And is there any way for me to debug this at all ?? My issue is that sometimes USB communication is stalled - maybe an error in a I2C communcation... Thanks Henrik

1 Answer

9 years ago.

Hi, did you manage to resolve this issue? I also can not debug with uVision. Tried both v4 and v5, but get the same debug message as you "Cannot access target, Shutting down debug session."

Hi, No I didn't. Was able to solve my immediate issue in other ways - but would still want to get this working...

posted by Henrik Löfgren 05 Mar 2015

Can you publish an example program of what you're trying to debug?? Would like to try using the same libraries and versions as you.

posted by Sam Grove 14 Apr 2015