ataradov / free-dap

Free and open implementation of the CMSIS-DAP debugger firmware
BSD 3-Clause "New" or "Revised" License
259 stars 62 forks source link

Would it be reasonable to implement this on an ESP8266/ESP32 via TCP? #26

Closed RoganDawes closed 2 years ago

RoganDawes commented 2 years ago

Just wondering how feasible it would be to run this on an ESP32, and provide access via a TCP connection instead of HID. I see there is https://github.com/windowsair/wireless-esp8266-dap, which uses USBIP to emulate a USB connection over TCP.

ataradov commented 2 years ago

It would be very easy. All you need to do is receive the request, pass the request payload to dap_process_request() and send back the response. You may want to add some additional verification fields so that random stray packets don't get interpreted as request/response, but that it optional.

The issue here is what tool is going to generare the requests. There are no standard CNSIS-DAP tools that use TCP, so you would need to implement that part too.

RoganDawes commented 2 years ago

I guess that is a very good point, and explains the use of usbip in the other implementation.

Thanks for the quick response!