Low transfer rate by using Insight + Jtagkey + OpenOCD

Hi all,

I’m trying to download my program (>200kb) into external RAM on the LPCE2294 board from Olimex with OpenOCD, Amontec Jtagkey and Insight. There is something I don’t understand

  1. The maximum transfer speed the Jtagkey has ever reached with Insight is 15kbytes/sec.

  2. Using "arm7_9 dcc_downloads enable " command , transfer rate decreases.

For test I tried to load a file into the memory using the OpenOCD command “load_binary”, suprisingly transfer rate > 120kbytes/sec.

Could you help me please?

Hi

Insight/gdb sends the data in small packets, less than 2k, to OpenOCD and waits before next packet,so there is a lot of handshaking, waiting and OpenOCD cannot do an unintrerrupted write of the whole memory block.

Using the OpenOCD load_binary, then OpenOCD loads the whole datablock from the file and then transfers it to the target as fast as possible with no extra wait.

Regards,

Magnus

Hi Magnus,

is it possible to configure Insight gdb to send larger packets?? If yes, how?

With kind regards,

Bach

Hello Bach,

try to use this:

set remote memory-write-packet-size fixed

set remote memory-write-packet-size 2048

set download-write-size 1792

Regards,

Michael

Hi Michael,

it works, thank you !! I have yet another questions:

  1. What is the difference between packet size and write size?

  2. How big is the maximum of these sizes? Where is it defined? ( I’m using WinARM. )

Regards,

Bach

Hi,

I have it now. Thank you very much for all your help!

Regards,

Bach

Hi bleviet,

are you sure that you get transfer rate 120kbytes/sec ?

I’m using home made device with ft2232 and I can get max transfer rate about 40kbytes/sec during writing internal RAM of LPC2148.

Best Regards

Dawid

Hello Dawid,

to get such high transfer rates, you have to enable some optimizations:

arm7_9 fast_memory_access enable

arm7_9 dcc_downloads enable

For the DCC downloads to work you need to configure a working area (working_area <target#> <backup|nobackup>). That working area can not be written to, but it can be used by your application. You could use the LPC214x’s USB FIFO RAM for this purpose, if you configure it properly before trying to use it.

Regards,

Dominic

Hi Dominic,

do you know why the transfer rate varies by using Insight gdb? I’ve noticed that, the bigger the file the slower is the transfer rate.

For example:

file size ~ 900 Kbytes → transfer rate: ~ 250kbits/sec

file size ~ 100 Kbytes → transfer rate: ~ 800kbits/sec

Or “load” same file, same file size, one time 800kbits/sec another time 400kbits/sec.

Regards,

Bach