On Thu, Jan 26, 2012 at 4:45 PM, Freddie Chopin <freddie_cho...@op.pl> wrote:
> W dniu 2012-01-25 23:49, Andreas Fritiofson pisze:
>
>> finishing the ftdi driver rewrite that will _really_ make a difference
>> for performance.
>
> Do you have something specific in mind? Was this discussed on the list so I
> could look into it?

No, just something I started a week or two ago and have been trying to
find the time to clean up to a reviewable state. It requires
libusb-1.0 and for now only supports the jtagkey layout. I plan on
having the different layouts handled in Tcl as much as possible, to
avoid the layout mess that's in ft2232.c. The branch is available at
http://repo.or.cz/w/openocd/andreasf.git/mpsse if you wan't to take a
sneak peek.

The reason for the rewrite is primarily the need for a solid driver
base for experimenting with architectural changes and non-jtag
protocols. And because the ft2232 driver is an unmaintainable mess.
Fixing the basic flaws in it and restructuring it to a sane state
would take weeks (boring weeks), the rewrite was in a working state
after a few (fun) evenings worth of coding. And now it should be real
easy to implement whatever protocol the FT2232 can handle on top of
the core communications layer. I've also realized that libftdi doesn't
really add much of value. In fact, I'm thinking of breaking out the
mpsse part to a library as a direct alternative to it.

Performance wasn't a primary goal, but since you're into performance
numbers, here's two test runs for you... :)

/Andreas
--
ft2232 driver:
$ time install/bin/openocd
Open On-Chip Debugger 0.6.0-dev-00330-g2670c15-dirty (2012-01-20-01:00)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
part: 0x6410, ver: 0x1)
Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
part: 0x6410, ver: 0x1)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x68ff0b7a msp: 0x1bd9bd34
3000 kHz
Info : device id = 0x20036410
Info : flash size = 128kbytes
stm32x mass erase complete
wrote 131072 bytes from file test.bin in 4.276374s (29.932 KiB/s)
verified 131072 bytes in 1.313473s (97.452 KiB/s)
dumped 131072 bytes in 6.199983s (20.645 KiB/s)
20480 bytes written at address 0x20000000
downloaded 20480 bytes in 0.260652s (76.731 KiB/s)
shutdown command invoked

real    0m13.588s
user    0m0.570s
sys     0m0.270s

ftdi driver:
$ time install/bin/openocd
Open On-Chip Debugger 0.6.0-dev-00330-g2670c15-dirty (2012-01-20-01:00)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
part: 0x6410, ver: 0x1)
Info : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b,
part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020,
part: 0x6410, ver: 0x1)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x68ff0b7a msp: 0x1bd9bd34
3000 kHz
Info : device id = 0x20036410
Info : flash size = 128kbytes
stm32x mass erase complete
wrote 131072 bytes from file test.bin in 3.898333s (32.835 KiB/s)
verified 131072 bytes in 0.577597s (221.608 KiB/s)
dumped 131072 bytes in 1.733289s (73.848 KiB/s)
20480 bytes written at address 0x20000000
downloaded 20480 bytes in 0.199222s (100.391 KiB/s)
shutdown command invoked

real    0m7.128s
user    0m0.580s
sys     0m0.130s

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to