Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi,

I've mentioned this idea elsewhere [1], but I wanted to also post it here to give it some visibility.

A common debugger operation involves reading a C string from memory. With a typical debug adapter protocol this requires a lot of back and forth over USB to avoid reading more data than necessary. In the worst case, we have a round trip per character read. This can generally be optimized to have the debugger software read more than 1 character per round trip, but at the cost of performance for shorter strings.

My idea would be to add an extension to the CMSIS-DAP protocol to support reading null terminated strings of arbitrary length with a single USB round trip. With this extension, the adapter would automatically issue MEM-AP commands to read a null terminated string until reaching the null terminator or a specified maximum length. Then it would send the string over the wire to the host. Host-side debugger software could be taught to use this protocol extension if available.

My questions are:

  1. Does this seem like a reasonable extension to CMSIS-DAP?
  2. What would be the right place to propose CMSIS-DAP protocol extensions? Would this forum work?

[1] osandov/drgn#313

You must be logged in to vote

Replies: 1 comment

Comment options

DAPLink is a downstream of CMSIS-DAP Firmware.

You could probably use DAPLink to create a prototype for your command extension(s) by adding it in the DAPLink vendor command range or vendor extended command range (see example here which is board-specific).

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.