public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot: Restarting a program without reseting the target
@ 2000-11-06 18:40 Fabrice Gautier
  2000-11-06 19:17 ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Gautier @ 2000-11-06 18:40 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

I was wondering if it is actually possible to stop a program and restart it
without the need to reset the target and redboot.
For now, when i want to restart the program I have to reset everything.

Do you think there is some chance to implement this feature? 

And what is supposed to happen when using Redboot to run a program I hit a
ctrl-C? For now with my i386 target, redboot sends a T packet as if there
was a gdb listenning. I would like to have back the Redboot shell when I hit
ctrl-C....

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the target
  2000-11-06 18:40 [ECOS] RedBoot: Restarting a program without reseting the target Fabrice Gautier
@ 2000-11-06 19:17 ` Jonathan Larmour
  2000-11-07  3:18   ` [ECOS] RedBoot: Restarting a program without reseting the ta Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Larmour @ 2000-11-06 19:17 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: Ecos-List (E-mail)

Fabrice Gautier wrote:
> 
> I was wondering if it is actually possible to stop a program and restart it
> without the need to reset the target and redboot.
> For now, when i want to restart the program I have to reset everything.
> 
> Do you think there is some chance to implement this feature?

Use the "kill" command in gdb when the target is stopped (by ctrl-c). That
will reset it target for you. Of course the hardware may be in a funny
state, so no guarantees you get something sensible.
 
> And what is supposed to happen when using Redboot to run a program I hit a
> ctrl-C? For now with my i386 target, redboot sends a T packet as if there
> was a gdb listenning. I would like to have back the Redboot shell when I hit
> ctrl-C....

Over to Gary.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the ta
  2000-11-06 19:17 ` Jonathan Larmour
@ 2000-11-07  3:18   ` Gary Thomas
  2000-11-07  3:41     ` Bart Veer
  2000-11-07  7:23     ` Jonathan Larmour
  0 siblings, 2 replies; 7+ messages in thread
From: Gary Thomas @ 2000-11-07  3:18 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Ecos-List (E-mail), Fabrice Gautier

On 07-Nov-2000 Jonathan Larmour wrote:
> Fabrice Gautier wrote:
>> 
>> I was wondering if it is actually possible to stop a program and restart it
>> without the need to reset the target and redboot.
>> For now, when i want to restart the program I have to reset everything.
>> 
>> Do you think there is some chance to implement this feature?
> 
> Use the "kill" command in gdb when the target is stopped (by ctrl-c). That
> will reset it target for you. Of course the hardware may be in a funny
> state, so no guarantees you get something sensible.
>  
>> And what is supposed to happen when using Redboot to run a program I hit a
>> ctrl-C? For now with my i386 target, redboot sends a T packet as if there
>> was a gdb listenning. I would like to have back the Redboot shell when I hit
>> ctrl-C....
> 
> Over to Gary.

This is the designed behaviour - ^C sent to a running program implies breaking
into GDB.  It would not be very simple to do otherwise.

However, once in GDB, sending the string "$k#6b" (without quotes of course)
will kill the GDB session and should restart RedBoot.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the ta
  2000-11-07  3:18   ` [ECOS] RedBoot: Restarting a program without reseting the ta Gary Thomas
@ 2000-11-07  3:41     ` Bart Veer
  2000-11-07  4:00       ` Gary Thomas
  2000-11-07  7:23     ` Jonathan Larmour
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Veer @ 2000-11-07  3:41 UTC (permalink / raw)
  To: gthomas; +Cc: ecos-discuss, Fabrice_Gautier

>>>>> "Gary" == Gary Thomas <gthomas@redhat.com> writes:

    Gary> On 07-Nov-2000 Jonathan Larmour wrote:
    >> Fabrice Gautier wrote:
    >>> 
    >>> I was wondering if it is actually possible to stop a program
    >>> and restart it without the need to reset the target and
    >>> redboot. For now, when i want to restart the program I have to
    >>> reset everything.
    >>> 
    >>> Do you think there is some chance to implement this feature?
    >> 
    >> Use the "kill" command in gdb when the target is stopped (by
    >> ctrl-c). That will reset it target for you. Of course the
    >> hardware may be in a funny state, so no guarantees you get
    >> something sensible.
    >> 
    >>> And what is supposed to happen when using Redboot to run a
    >>> program I hit a ctrl-C? For now with my i386 target, redboot
    >>> sends a T packet as if there was a gdb listenning. I would
    >>> like to have back the Redboot shell when I hit ctrl-C....
    >> 
    >> Over to Gary.

    Gary> This is the designed behaviour - ^C sent to a running
    Gary> program implies breaking into GDB. It would not be very
    Gary> simple to do otherwise.

    Gary> However, once in GDB, sending the string "$k#6b" (without
    Gary> quotes of course) will kill the GDB session and should
    Gary> restart RedBoot.

Out of interest, what is the definition of "restart" in this context?
Ideally there would be some code in each platform HAL to reset the
various chips as much as possible and get back to a coherent state.
Obviously this cannot be achieved 100% on all platforms, but getting
close would be useful.

Bart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the ta
  2000-11-07  3:41     ` Bart Veer
@ 2000-11-07  4:00       ` Gary Thomas
  2000-11-07  6:21         ` Jesper Skov
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2000-11-07  4:00 UTC (permalink / raw)
  To: Bart Veer; +Cc: Fabrice_Gautier, ecos-discuss

On 07-Nov-2000 Bart Veer wrote:
>     Gary> However, once in GDB, sending the string "$k#6b" (without
>     Gary> quotes of course) will kill the GDB session and should
>     Gary> restart RedBoot.
> 
> Out of interest, what is the definition of "restart" in this context?
> Ideally there would be some code in each platform HAL to reset the
> various chips as much as possible and get back to a coherent state.
> Obviously this cannot be achieved 100% on all platforms, but getting
> close would be useful.

That's exactly what's meant.  Each platform has the notion of reset,
defined by the HAL, which is supposed to mean "put the system back into
a state similar to power-on or pressing reset".  On some platforms we
have hardware support for this and it works very well.  On others, we
default to just jumping into the start of the ROM environment.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the ta
  2000-11-07  4:00       ` Gary Thomas
@ 2000-11-07  6:21         ` Jesper Skov
  0 siblings, 0 replies; 7+ messages in thread
From: Jesper Skov @ 2000-11-07  6:21 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Bart Veer, Fabrice_Gautier, ecos-discuss

>>>>> "Gary" == Gary Thomas <gthomas@redhat.com> writes:

Gary> On 07-Nov-2000 Bart Veer wrote: However, once in GDB, sending
Gary> the string "$k#6b" (without quotes of course) will kill the GDB
Gary> session and should restart RedBoot.
>>  Out of interest, what is the definition of "restart" in this
>> context?  Ideally there would be some code in each platform HAL to
>> reset the various chips as much as possible and get back to a
>> coherent state.  Obviously this cannot be achieved 100% on all
>> platforms, but getting close would be useful.

Gary> That's exactly what's meant.  Each platform has the notion of
Gary> reset, defined by the HAL, which is supposed to mean "put the
Gary> system back into a state similar to power-on or pressing reset".
Gary> On some platforms we have hardware support for this and it works
Gary> very well.  On others, we default to just jumping into the start
Gary> of the ROM environment.

IMO this feature is not getting all the kudos and good PR it deserves :)

I often run all eCos tests on a board with this reset-on-detach
feature with something as simple as:

for f in `find install/tests -type f`;do echo $f `date`; \
    ARCH-elf-gdb -nw $f ; done 2>&1|tee run.log

and a .gdbinit in the current directory containing:

 set remotebaud 38400
 ta re /dev/ttyS2
 load
 rbreak cyg_test_exit
 rbreak cyg_assert_fail
 cont
 quit


Works remarkably well - and is much less hassle than playing with X10
reset controllers and what not. Of course, if there's a test failure
it all stops - but if there's a test failure, it needs fixing, so it's
all honky dory...

Jesper

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot: Restarting a program without reseting the ta
  2000-11-07  3:18   ` [ECOS] RedBoot: Restarting a program without reseting the ta Gary Thomas
  2000-11-07  3:41     ` Bart Veer
@ 2000-11-07  7:23     ` Jonathan Larmour
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Larmour @ 2000-11-07  7:23 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Ecos-List (E-mail), Fabrice Gautier

Gary Thomas wrote:
> 
> However, once in GDB, sending the string "$k#6b" (without quotes of course)
> will kill the GDB session and should restart RedBoot.

Just to be clear, that is what the "kill" command does.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-11-07  7:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-06 18:40 [ECOS] RedBoot: Restarting a program without reseting the target Fabrice Gautier
2000-11-06 19:17 ` Jonathan Larmour
2000-11-07  3:18   ` [ECOS] RedBoot: Restarting a program without reseting the ta Gary Thomas
2000-11-07  3:41     ` Bart Veer
2000-11-07  4:00       ` Gary Thomas
2000-11-07  6:21         ` Jesper Skov
2000-11-07  7:23     ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).