GithubHelp home page GithubHelp logo

isabella232 / free-dap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arduino/free-dap

0.0 0.0 0.0 1.24 MB

Free and open implementation of the CMSIS-DAP debugger firmware

License: BSD 3-Clause "New" or "Revised" License

C 99.97% Makefile 0.03%

free-dap's Introduction

Free-DAP

This is a free and open implementation of the CMSIS-DAP debugger firmware.

Only SWD protocol is supported for now. If you have a real need for JTAG support, please contact me.

Platform requirements

To create a CMSIS-DAP compliant debugger, your platform must:

  • Implement USB HID device able to receive and send arbitrary reports
  • Provide configuration file dap_config.h with definitions for hardware-dependent calls
  • Call dap_init() at the initialization time
  • Call dap_process_request() for every received request and send the response back

Configuration

For complete list of settings see one of the existing configuration file, they are pretty obvious.

To configure clock frequency you need to specify two parameters:

  • DAP_CONFIG_DELAY_CONSTANT - clock timing constant. This constant can be determined by calling dap_clock_test() with varying parameter value and measuring the frequency on the SWCLK pin. Delay constant value is the value of the parameter at which output frequency equals to 1 kHz.
  • DAP_CONFIG_FAST_CLOCK - threshold for switching to fast clock routines. This value defines the frequency, at which more optimal pin manipulation functions are used. This is the frequency produced by dap_clock_test(1) on the SWCLK pin. You can also measure maximum achievable frequency on your platform by calling dap_clock_test(0).

Your configuration file will need to define the following pin manipulation functions:

  • DAP_CONFIG_SWCLK_TCK_write()
  • DAP_CONFIG_SWDIO_TMS_write()
  • DAP_CONFIG_TDO_write()
  • DAP_CONFIG_nTRST_write()
  • DAP_CONFIG_nRESET_write()
  • DAP_CONFIG_SWCLK_TCK_read()
  • DAP_CONFIG_SWDIO_TMS_read()
  • DAP_CONFIG_TDI_read()
  • DAP_CONFIG_TDO_read()
  • DAP_CONFIG_nTRST_read()
  • DAP_CONFIG_nRESET_read()
  • DAP_CONFIG_SWCLK_TCK_set()
  • DAP_CONFIG_SWCLK_TCK_clr()
  • DAP_CONFIG_SWDIO_TMS_in()
  • DAP_CONFIG_SWDIO_TMS_out()

Note that all pin manipulation functions are required even if one of the interfaces (JTAG or SWD) is not enabled.

Additionally configuration file must provide basic initialization and control functions:

  • DAP_CONFIG_SETUP()
  • DAP_CONFIG_DISCONNECT()
  • DAP_CONFIG_CONNECT_SWD()
  • DAP_CONFIG_CONNECT_JTAG()
  • DAP_CONFIG_LED()

free-dap's People

Contributors

ataradov avatar facchinm avatar majbthrd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.