EmbDev.net

Forum: ARM programming with GCC/GNU tools Slow transfer rate with gdb "load"command


von Dmitry M. (mitya)


Rate this post
useful
not useful
Hello.

(I'm using Insight-GDB and OpenOCD from Yagarto. My JTAG tool is Olimex
ARM-USB-OCD. I use configuration and bat-files from Yagarto's
LPC2148Test example.)

When Insight executes "load" command with elf from LPC2148Test project,
the transfer rate is about 500 bytes/s and there is no timeout in
OpenOCD.
When I'm loading another project (lpc2138_uart0_irq example) in Insight
- transfer rate is also ok. But when I'm loading it next time, transfer
rate is 240 bytes/s and OpenOCD has "timeout waiting for algorithm"
error.
I suppose that it's because of some peripherials settings.
Can you advise me which LPC2148 registers could influence to this?

Can you also explain to me why debugger must program the
microcontroller. Can I program it before, and then run debugger without
"load" command?

Thank you in advance
Dmitry

von Clifford S. (clifford)


Rate this post
useful
not useful
Dmitry Mastykin wrote:
> I suppose that it's because of some peripherials settings.
> Can you advise me which LPC2148 registers could influence to this?

JTAG is entirely independant of the microcontrollers peripherals and
registers. It is a vary simple interface. Moreover its clock rate is
entirely determined by the host not the target. So I would suggest that
it is a host problem.


> Can you also explain to me why debugger must program the
> microcontroller. Can I program it before, and then run debugger without
> "load" command?
>
Yes, you can do that. The code (or at least the symbol table) must have
been loaded to the debugger so that it can provide source level
debugging. That symbol table must also match exactly the code on the
target, so if you rebuild the code, you must reload the target. But yes
you can simply connect to a target and debug the existing code. If the
code is in ROM you cannot set software breakpoints, only hardware
breakpoints, and these are a severely limited resource (usually just
two). Also if you are debugging code that is copied from ROM to RAM
during boot-up, you must set a hardware breakpoint at some point after
the code has been copied, this then allows any software breakpoints to
be applied (as the copy to RAM will have overwritten them otherwise).

Clifford

von Dmitry M. (mitya)


Rate this post
useful
not useful
Clifford Slocombe wrote:
> JTAG is entirely independant of the microcontrollers peripherals and
> registers. It is a vary simple interface. Moreover its clock rate is
> entirely determined by the host not the target. So I would suggest that
> it is a host problem.
>
Thank you very much for the answer! I think, I will not use "load"
command for the present. But for me it's strange, how may loading of
simple LPC2148Test program may be so healing for the host, so that the
rate of following loading of my project increases ten times, up to
3kB/s.

Dmitry

von Clifford S. (clifford)


Rate this post
useful
not useful
I have no idea, and have not used this device, or OpenOCD. I would
suggest putting a scope on the TCK line to see what rate it is achieving
and whether it is intermittent.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.