EmbDev.net

Forum: ARM programming with GCC/GNU tools Yagarto Eclipse - Processor Reset


Author: Francisco Maggiori (cisco)
Posted on:

Rate this post
0 useful
not useful
Hi:

How do you reset the ARM processor without "relaunching" the debugger
and "reloading" the code? Is there a reset/restart command that can be
invoked from the console to reset just the processor?  There is a
"reset" command under the "run" menu on the IDE but this command seems
to be disabled all the time.

Cisco

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
The availability of a Reset function will depend on how you connect GDB
to your target. Either way you will probably have to use the GDB command
line directly rather than through the IDE. I don't use Eclipse, but I
assume that it provides a GDB console at least?

If you are using OpenOCD, it does not implement GDB's reset command
which is probably why it is disabled. The GDB reset is deprecated in any
case. However OpenOCD has a command interface from where you can perform
a reset:
http://openfacts.berlios.de/index-en.phtml?title=O...

I use a Abatron BDI2000 that has a proprietary monitor interface, tying
"monitor reset" in GDB resets the target. You may find this works with
OpenOCD as well.

Most COTS boards have a reset button. If yours does not, I imagine that
you could modify the JTAG hardware to add a button to the hardware reset
line.

On my platform I have developed a command shell rather like (in fact
exactly like) VxWorks' target shell from where I can call any function
that has external linkage directly. I have a reset function that simply
enables the watchdog in reset-on-timeout mode and waits for it to
timeout.

Clifford

Author: Francisco Maggiori (cisco)
Posted on:

Rate this post
0 useful
not useful
Clifford, thanks for the response.  Eclipse does provide a GDB console
but I have not been able to find any reset (restart?) command that I
would work.

Cisco


Clifford Slocombe wrote:
> The availability of a Reset function will depend on how you connect GDB
> to your target. Either way you will probably have to use the GDB command
> line directly rather than through the IDE. I don't use Eclipse, but I
> assume that it provides a GDB console at least?
>
> If you are using OpenOCD, it does not implement GDB's reset command
> which is probably why it is disabled. The GDB reset is deprecated in any
> case. However OpenOCD has a command interface from where you can perform
> a reset:
> http://openfacts.berlios.de/index-en.phtml?title=O...
>
> I use a Abatron BDI2000 that has a proprietary monitor interface, tying
> "monitor reset" in GDB resets the target. You may find this works with
> OpenOCD as well.
>
> Most COTS boards have a reset button. If yours does not, I imagine that
> you could modify the JTAG hardware to add a button to the hardware reset
> line.
>
> On my platform I have developed a command shell rather like (in fact
> exactly like) VxWorks' target shell from where I can call any function
> that has external linkage directly. I have a reset function that simply
> enables the watchdog in reset-on-timeout mode and waits for it to
> timeout.
>
> Clifford

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
Francisco Maggiori wrote:
> Clifford, thanks for the response.  Eclipse does provide a GDB console
> but I have not been able to find any reset (restart?) command that I
> would work.
>
> Cisco
As I mentioned the GDB reset command is deprecated and not necessarily
implemented in all debug monitors. The GDB 'monitor' command send
commands directly to the underlying debug monitor (RDI, OpenOCD etc.).


Clifford

Author: Spencer Oliver (ntfreak)
Posted on:

Rate this post
0 useful
not useful
If you are using openocd there are a few ways of performing this.

1. the method mentioned by Clifford above, using the gdb monitor
interface - 'monitor reset' or monitor 'soft_reset_halt'
Also have a look at the openocd command 'gdb_detach' - as with this you
can specify a behaviour when you detach from your target

2. The latest version from svn (currently 247) also supports the
extended remote protocol - which includes a reset.
Normally you connect using a line similar to the following:
target remote localhost:2000
if you change to
target extended-remote localhost:2000

you can then issue a start (or run) command (eclipse may do this for
you).
This has been tested with gdb/insight but not eclipse.
If you use the memory map feature and the start command gdb will also
set a temp breakpoint at main - very handy.

openocd has a few other features that have been added over the xmas
break.
1. support for gdb memory maps - gdb will now know  where the flash
memory is located and automatically use hardware breakpoints.
2. support for gdb flash programming.

Cheers
Spen

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.