Proposed changes to the OpenOCD driver

OpenOCD JTAG debugging with the Bus Pirate.

Proposed changes to the OpenOCD driver

Postby rdiez » Wed Jun 05, 2013 12:50 pm

Hi all:

I made the following changes to the OpenOCD side, please see the attached source file:

- Discard any stale data from the previous connection.
This change was discussed here before.
- Disable CR/LF translation.
I was getting some trouble, see my previous message in this forum.
- Increase the average USB packet size.
The 1 KiB buffer was underutilized.
I am getting now better performance with the Arduino Due.
- Option "buspirate_speed fast" now works out of the box.
I am getting 8 KiB/s transfer with GDB's 'load' command, instead of just 1 KiB/s.
- Some extra comments, error checking, etc.

I wanted to submit a patch to the OpenOCD project, I am using the git head at the moment.

Can somebody review or test the new driver version? I only have a Bus Pirate v3.5 (USB) to test it against.

Thanks,
rdiez
Attachments
buspirate.c
(28.39 KiB) Downloaded 258 times
rdiez
Newbie
Newbie
 
Posts: 13
Joined: Tue Sep 27, 2011 11:48 am

Re: Proposed changes to the OpenOCD driver

Postby robots » Wed Jun 05, 2013 2:59 pm

You need to learn how to use git diff (to produce patches), and git format patch (to produce formated patches).... Yet better, learn how to submit code directly to openocd tracking system. (its not that hard and you get proper credit)

Just be sure that the code does not break anything.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Proposed changes to the OpenOCD driver

Postby rdiez » Wed Jun 05, 2013 3:47 pm

I thought it would be easier for you guys to git clone the OpenOCD repository and just overwrite the file, you can then view the diff locally.

In order to build and run it, you need to clone the repo anyway, I've seen people here doing it so as to manually add the previously-suggested delay for "buspirate_speed fast" to work. A single diff does not give you enough context to review it properly anyhow.

I really hope somebody can test it, because saying "Just be sure that the code does not break anything" does not really help!
rdiez
Newbie
Newbie
 
Posts: 13
Joined: Tue Sep 27, 2011 11:48 am


Return to OpenOCD JTAG