public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] GDB stubs problems ARM/AT91/EB40 -
@ 2002-03-26 17:46 Marc Pignat
  2002-04-03 20:43 ` Jonathan Larmour
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Pignat @ 2002-03-26 17:46 UTC (permalink / raw)
  To: ecos-discuss

I think that I've found a (partial) answer to my question ...

the stack pointer of the main thread is the stack pointer of gdb stubs.

eCos as reserved a stack for the main thread (as defined in the configuration tool, but the main thread don't use it.

why the main thread does not take this stack ???

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] GDB stubs problems ARM/AT91/EB40 -
  2002-03-26 17:46 [ECOS] GDB stubs problems ARM/AT91/EB40 - Marc Pignat
@ 2002-04-03 20:43 ` Jonathan Larmour
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 2002-04-03 20:43 UTC (permalink / raw)
  To: Marc Pignat; +Cc: ecos-discuss

Marc Pignat wrote:
> 
> I think that I've found a (partial) answer to my question ...
> 
> the stack pointer of the main thread is the stack pointer of gdb stubs.

Actually what happens is that if the stubs are to be entered, the state is
stored on the stack of the current thread, whatever that is, and then we
switch to a different stack. So calling into the stub shouldn't make much
difference to the stack usage of any threads.
 
> eCos as reserved a stack for the main thread (as defined in the configuration tool, but the main thread don't use it.
> 
> why the main thread does not take this stack ???

Perhaps it hasn't run yet, or has already exited.

You can change the config to stop there being a main thread at all if you
like.

But from your trace it looks like there's some weird recursion going on
which is what is eating through your stack. It looks like you haven't
finished processing one timeslice interrupt before getting another. 

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* [ECOS] GDB stubs problems ARM/AT91/EB40 -
@ 2002-03-26  6:38 Marc Pignat
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Pignat @ 2002-03-26  6:38 UTC (permalink / raw)
  To: ecos-discuss

I've got problems running the GDB stubs on a EB40 board. when the application is running without stubs, it works fine. 

But with the stubs, I've got the message : 
Assert fail:Stack_ptr below base...

I've tried with the examples witch comes with ecos (below is a copy of the dump after simple-alarm.c)

If anybody as an idea ... 

thanks in advance

                                 Marc












Time is 8
Stack usage for thread 020d1198: 588
ASSERT FAIL: <3>thread.inl          [  97] void Cyg_HardwareThread::check_stack()
                                            Stack_ptr below base
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 502] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 520] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                        'quantum consumed, time to reschedule'
TRACE: <1>sched.cxx           [ 420] cyg_bool Cyg_Scheduler::check_this()
                                        {{enter
TRACE: <1>sched.cxx           [ 420] cyg_bool Cyg_Scheduler::check_this()
                                        }}RETURNING UNSET!
TRACE: <1>mlqueue.cxx         [ 562] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                      }}return void
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 502] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 520] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                        'quantum consumed, time to reschedule'
TRACE: <1>sched.cxx           [ 420] cyg_bool Cyg_Scheduler::check_this()
                                        {{enter
TRACE: <1>sched.cxx           [ 420] cyg_bool Cyg_Scheduler::check_this()
                                        }}RETURNING UNSET!
TRACE: <1>mlqueue.cxx         [ 562] void Cyg_Scheduler_Implementation::timeslice_cpu()
                                      }}return void
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <1>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter
TRACE: <1>thread.cxx          [1150] static void Cyg_ThreadTimer::alarm()
                                      {{enter
TRACE: <1>thread.cxx          [ 369] void Cyg_Thread::wake()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 207] void Cyg_Scheduler_Implementation::add_thread()
                                        {{enter
TRACE: <1>mlqueue.cxx         [ 207] void Cyg_Scheduler_Implementation::add_thread()
                                          ((thread=020cdc44))
TRACE: <1>mlqueue.cxx         [ 268] void Cyg_Scheduler_Implementation::add_thread()
                                        }}return void
TRACE: <1>thread.cxx          [ 393] void Cyg_Thread::wake()
                                      }}return void
TRACE: <1>thread.cxx          [1191] static void Cyg_ThreadTimer::alarm()
                                      }}return void
TRACE: <1>mlqueue.cxx         [ 467] void Cyg_Scheduler_Implementation::timeslice()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 492] void Cyg_Scheduler_Implementation::timeslice()
                                      }}return void
TRACE: <1>mlqueue.cxx         [ 124] class Cyg_Thread * Cyg_Scheduler_Implementation::schedule()
                                      {{enter
TRACE: <1>mlqueue.cxx         [ 197] class Cyg_Thread * Cyg_Scheduler_Implementation::schedule()
                                      }}returning thread 020cdc44
TRACE: <3>sched.cxx           [ 301] static void Cyg_Scheduler::unlock_inner()
                                      }}return void
TRACE: <3>thread.cxx          [ 999] void Cyg_Thread::delay()
                                      }}return void
TRACE: <3>mutex.cxx           [ 205] cyg_bool Cyg_Mutex::lock()
                                      {{enter
TRACE: <3>sched.cxx           [ 132] static void Cyg_Scheduler::unlock_inner()
                                      {{enter

Scheduler:

Lock:                1
Current Thread:      alarm_thread

Threads:

         Idle Thread pri =  31 state =      R id =   1
                     stack base = 020d08c4 ptr = 00001f40 size = 00000800
                     sleep reason     NONE wake reason     NONE
                     queue = 00000000      wait info = 00000000

                main pri =  10 state =     X  id =   2
                     stack base = 020d1238 ptr = 020d5028 size = 00004000
                     sleep reason     NONE wake reason     NONE
                     queue = 00000000      wait info = 00000000

        alarm_thread pri =   4 state =      R id =   3
                     stack base = 020cdce4 ptr = 020ceb04 size = 00001000
                     sleep reason     NONE wake reason     DONE
                     queue = 00000000      wait info = 00000000





=====================================================================
Marc Pignat - Collaborateur Scientifique (Système Intégrés)
Haute Ecole valaisanne
Rte du Rawyl 47
1950 Sion
=====================================================================
Bureau : A306 tél : +41 27 606 8748 fax : +41 27 606 8715 mail : marc.pignat@hevs.ch
Privé : +41 79 678 71 13

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

end of thread, other threads:[~2002-04-04  4:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-26 17:46 [ECOS] GDB stubs problems ARM/AT91/EB40 - Marc Pignat
2002-04-03 20:43 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2002-03-26  6:38 Marc Pignat

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).