Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SWDP driver interface API and bit-bang driver, add CMSIS-DAP compatible controller #53798

Merged
merged 14 commits into from
Jun 14, 2024

Commits on Jun 11, 2024

  1. driver: add SWDP driver interface API and bit-bang driver

    Add Serial Wire Debug Port interface driver API and bit-bang driver.
    
    The driver requires a simple Hardware Interface Circuits (HICs),
    where signals CLK, DOUT, DIN, ENn, OE_ENn, RESETn
    are connected to board GPIOs and buffered signals SWD_CLK and SWD_DIO
    to the target.
    
    Signal OE_ENn controls the direction of the Serial Wire (SWD_DIO),
    ENn the buffers SWD_CLK possibly others and enables/disables HIC.
    
    Signed-off-by: Johann Fischer <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    bf964cf View commit details
    Browse the repository at this point in the history
  2. dap: add CMSIS-DAP compatible controller

    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 <[email protected]>
    jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    022b964 View commit details
    Browse the repository at this point in the history
  3. dap: add Konfig option to set maximum packet size

    This also fixes a bug where the packet size returned was only 17 byte.
    
    Signed-off-by: Johan Carlsson <[email protected]>
    Johan Carlsson authored and jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    e74f7cd View commit details
    Browse the repository at this point in the history
  4. dap: do not return error in DAP connect command

    If a host client crashes or fails to disconnect, the probe will
    hang. Allow a new connection without raising errors.
    
    Signed-off-by: Johan Carlsson <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    Johan Carlsson authored and jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    abdb742 View commit details
    Browse the repository at this point in the history
  5. driver: swdp_bitbang: rework pin configurations

    Move low-level GPIO functions to a separate file and use GPIO driver
    API if low-level GPIO support is not available for the platform.
    Allows alternative pin configuration using only two pins, clk and dio.
    Improve binding description.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    4c88135 View commit details
    Browse the repository at this point in the history
  6. drivers: swdp_bitbang: add SW output sequence

    Add API to read count bits from SWDIO into data LSB first.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    3422925 View commit details
    Browse the repository at this point in the history
  7. dap: implement wait for SWJ pins command

    Implement wait for SWJ pins command.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    13f954d View commit details
    Browse the repository at this point in the history
  8. dap: add support for DAP_INFO string elements

    Add support for DAP_INFO string elements.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    72acab5 View commit details
    Browse the repository at this point in the history
  9. dap: react properly to unsupported UART commands

    Add ID_DAP_UART_* command definitions and react properly to
    unsupported UART commands.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    7bfc110 View commit details
    Browse the repository at this point in the history
  10. dap: implement DAP SWD sequence command

    DAP SWD sequence command is a requirement to support CMSIS-DAPv2.
    Raise supported version to "2.1.0".
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    jfischer-no committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    832fc70 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

  1. samples: debug: add CMSIS DAP sample using USB as interface

    Add CMSIS DAP sample using USB as interface.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    jfischer-no committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    75b50a1 View commit details
    Browse the repository at this point in the history
  2. dap: fix timeout handling

    Use k_timepoint_t for timeout handling in the swj_pins function.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    c663d04 View commit details
    Browse the repository at this point in the history
  3. driver: swdp_bitbang: hardcode request lut

    Hardcode the lookup table for SWDP requests.
    This is an optimization to save some space.
    Documentation was added to understand the values.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    b469d41 View commit details
    Browse the repository at this point in the history
  4. drivers: swdp: document API

    This patch adds documentation for the SWDP API.
    
    Signed-off-by: Maximilian Deubel <[email protected]>
    Signed-off-by: Johann Fischer <[email protected]>
    maxd-nordic authored and jfischer-no committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    a4f7311 View commit details
    Browse the repository at this point in the history