This patch set enables targets to implement asynchronous algorithms that
can be run in the background while OpenOCD performs other tasks. It also
implements async algorithm support for ARMv7-M and enables it for the
Cortex-M3 target. The final two patches rewrites the stm32x flash driver
to use an async algorithm for block writes.

Speed test on a STM32 Primer (STM32F103 platform with built in RLink) with the 
following openocd.cfg
---
source [find interface/rlink.cfg]
source [find target/stm32.cfg]

$_TARGETNAME configure -event reset-init {
      mww 0x40022000 0x32
      mww 0x40021004 0x3c0400
      mww 0x40021000 0x01000883
      sleep 10
      mww 0x40021004 0x3c0402
      sleep 10
      adapter_khz 3000
}

init
reset init
poll off
stm32x mass_erase 0
flash write_image test.bin 0x08000000
verify_image test.bin 0x08000000
shutdown
---

Vanilla:
wrote 65536 bytes from file test.bin in 8.316117s (7.696 KiB/s)
verified 65536 bytes in 0.748795s (85.471 KiB/s)

Async patch:
wrote 65536 bytes from file test.bin in 4.084972s (15.667 KiB/s)
verified 65536 bytes in 0.772365s (82.862 KiB/s)

Speedup of 100%!

Wait, there's more... the last run was limited by the slow RLink throughput.
The previously sent Rlink patchset increases that, but still has the high
latency.

RLink patch only:
wrote 65536 bytes from file test.bin in 7.171075s (8.925 KiB/s)
verified 65536 bytes in 0.748815s (85.468 KiB/s)

RLink+Async patch
wrote 65536 bytes from file test.bin in 3.016943s (21.214 KiB/s)
verified 65536 bytes in 0.773821s (82.706 KiB/s)

Speedup of 137%!

While the RLink patch alone only increases speed by 15%, because the     
speed is still limited by roundtrip latency, with the async algorithm
the speed increase from the RLink patch is 35%, since the algorithm
is now bound by throughput, not latency.                           

It would be nice to see some figures using faster interfaces, say some
FT2232H design. Unfortunately I don't have one right now.

/Andreas

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to