EmbDev.net

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


von Francisco M. (cisco)


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

von Clifford S. (clifford)


Rate this post
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=OpenOCD_commands

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

von Francisco M. (cisco)


Rate this post
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=OpenOCD_commands
>
> 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

von Clifford S. (clifford)


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

von Spencer O. (ntfreak)


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

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.