Although we have the three layers, SWDP driver API, DAP stack, and USB
backend, to implement a debug probe, there is no way for the user to
instantiate the DAP context, which would allow it to be used with
different backends or to change the configuration at runtime.
The Debug Access Port (DAP) is an implementation of the ARM Debug
Interface (ADI) that is typically integrated into SoC.
With all three layers, we implement a link to the DAP on the SoC.
Let's call it Zephyr DAP Link and use the dap_link prefix. There is also
a MBED DAPLink project that implements similar functionality, but using
a different name would likely cause more confusion.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The backend uses a new USB device stack and bulk endpoints. Only a
single instance of the backend function is currently supported. Both DAP
packet processing and the new backend are prepared to support multiple
instances, but require a user interface and minor modifications.
New backen has similar functionality to what is provided by the function
in the sample samples/subsys/dap.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
We need a way to update the value configured by option
CMSIS_DAP_PACKET_SIZE at runtime. For example, the USB backend may have
different values depending on the speed at which the device is being
enumerated.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Add CMSIS-DAP compatible controller which is a handler between
the host interface and SWD driver. The controller follows CMSIS-DAP
reference implementation. It expects a request buffer from the host
interface, splits it to simple transfers and forwards to the DP driver,
and finally returns a response buffer to the host.
Interface to the host can be implemented with USB HID device support.
Controller implements only SW-DP support and is tested
with pyOCD and ADIv5.x.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>