EmbDev.net

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


Author: Dmitry Mastykin (mitya)
Posted on:

Rate this post
0 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

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 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

Author: Dmitry Mastykin (mitya)
Posted on:

Rate this post
0 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

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 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.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.