public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Enabling Interrupts
@ 2001-04-26  2:58 Christoph Csebits
  2001-04-26  3:24 ` Linus Nielsen Feltzing
  2001-04-26  4:30 ` Hugo Tyson
  0 siblings, 2 replies; 5+ messages in thread
From: Christoph Csebits @ 2001-04-26  2:58 UTC (permalink / raw)
  To: ecos-discuss

Hi,

i am working on an eCos port for a PowerPC MPC860T
based board. On the board is a simple "load and go"
bootstrapper doing simple board initialization.

Serial ports under eCos are not yet working, but
i have blinking leds (based on simple hello.c).

Then i started to try this with two threads.
My problem is, that enabling the interrupts
(in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
never returns. 

Any idea, where to start?

best regards
Christoph

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

* Re: [ECOS] Enabling Interrupts
  2001-04-26  2:58 [ECOS] Enabling Interrupts Christoph Csebits
@ 2001-04-26  3:24 ` Linus Nielsen Feltzing
  2001-05-02  7:39   ` Christoph Csebits
  2001-04-26  4:30 ` Hugo Tyson
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Nielsen Feltzing @ 2001-04-26  3:24 UTC (permalink / raw)
  To: ecos-discuss

It looks like a problem with your interrupts.
How are your vectors set up? Where are they located (interrupt prefix)?
It is probably the Decrementer interrupt that has triggered.

/Linus

----- Original Message ----- 
From: "Christoph Csebits" <Christoph.Csebits@frequentis.com>
To: <ecos-discuss@sources.redhat.com>
Sent: Thursday, April 26, 2001 11:57 AM
Subject: [ECOS] Enabling Interrupts


> Hi,
> 
> i am working on an eCos port for a PowerPC MPC860T
> based board. On the board is a simple "load and go"
> bootstrapper doing simple board initialization.
> 
> Serial ports under eCos are not yet working, but
> i have blinking leds (based on simple hello.c).
> 
> Then i started to try this with two threads.
> My problem is, that enabling the interrupts
> (in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
> never returns. 
> 
> Any idea, where to start?
> 
> best regards
> Christoph
> 

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

* Re: [ECOS] Enabling Interrupts
  2001-04-26  2:58 [ECOS] Enabling Interrupts Christoph Csebits
  2001-04-26  3:24 ` Linus Nielsen Feltzing
@ 2001-04-26  4:30 ` Hugo Tyson
  1 sibling, 0 replies; 5+ messages in thread
From: Hugo Tyson @ 2001-04-26  4:30 UTC (permalink / raw)
  To: ecos-discuss


Christoph Csebits <Christoph.Csebits@frequentis.com> writes:
> i am working on an eCos port for a PowerPC MPC860T
> based board. On the board is a simple "load and go"
> bootstrapper doing simple board initialization.
> 
> Serial ports under eCos are not yet working, but
> i have blinking leds (based on simple hello.c).
> 
> Then i started to try this with two threads.
> My problem is, that enabling the interrupts
> (in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
> never returns. 
> 
> Any idea, where to start?

You probably have an interrupt loop; ie. some source is interrupting and
there is no handler, so the CPU spins being interrupted constantly.  Or
it's hung up trying to use the serial, or something.  If you had a serial
port you might see the results of this code from hal_misc.c (so long as
you're not using VIRTUAL_VECTOR_SUPPORT when an empty routine is used
instead):

externC cyg_uint32
hal_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
{
    diag_printf("Interrupt: %d\n", vector);

    CYG_FAIL("Spurious Interrupt!!!");
    return 0;
}

You could modify that to diddle your LEDs and loop forever so you know it
was in there; print the interrupt vector number in LEDflashes.  Track down
the hardware that's on that interrupt number and shut it down and mask its
interrupt during startup so it's not interrupting and you can move onto the
next inexplicable crash ;-)

HTH,
	- Huge

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

* Re: [ECOS] Enabling Interrupts
  2001-04-26  3:24 ` Linus Nielsen Feltzing
@ 2001-05-02  7:39   ` Christoph Csebits
  2001-05-02  8:28     ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Csebits @ 2001-05-02  7:39 UTC (permalink / raw)
  To: Linus Nielsen Feltzing; +Cc: ecos-discuss

On Thu, Apr 26, 2001 at 12:26:34PM +0200, Linus Nielsen Feltzing wrote:
> It looks like a problem with your interrupts.
> How are your vectors set up? Where are they located (interrupt prefix)?

Due to using not the ecos gdb stub to upload my applications the
exception vector table is not initialized/set up.

How can i configure eCos to set up the vector tables, and how
can i verify that they are put into the right memory location?

And is there anything to manage after the vector table is set up?
(registering some isr routines, or is it done automatically)

> It is probably the Decrementer interrupt that has triggered.
you are right, it was the Decrementer interrupt.

prehistory:
> > Hi,
> > 
> > i am working on an eCos port for a PowerPC MPC860T
> > based board. On the board is a simple "load and go"
> > bootstrapper doing simple board initialization.
> > 
> > Serial ports under eCos are not yet working, but
> > i have blinking leds (based on simple hello.c).
> > 
> > Then i started to try this with two threads.
> > My problem is, that enabling the interrupts
> > (in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
> > never returns. 
> > 
> > Any idea, where to start?
> > 
> > best regards
> > Christoph
> > 
best regards, Christoph

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

* Re: [ECOS] Enabling Interrupts
  2001-05-02  7:39   ` Christoph Csebits
@ 2001-05-02  8:28     ` Gary Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2001-05-02  8:28 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: ecos-discuss, Linus Nielsen Feltzing

On 02-May-2001 Christoph Csebits wrote:
> On Thu, Apr 26, 2001 at 12:26:34PM +0200, Linus Nielsen Feltzing wrote:
>> It looks like a problem with your interrupts.
>> How are your vectors set up? Where are they located (interrupt prefix)?
> 
> Due to using not the ecos gdb stub to upload my applications the
> exception vector table is not initialized/set up.
> 
> How can i configure eCos to set up the vector tables, and how
> can i verify that they are put into the right memory location?
> 

Set  CYGSEM_HAL_POWERPC_COPY_VECTORS

> And is there anything to manage after the vector table is set up?
> (registering some isr routines, or is it done automatically)
> 
>> It is probably the Decrementer interrupt that has triggered.
> you are right, it was the Decrementer interrupt.
> 
> prehistory:
>> > Hi,
>> > 
>> > i am working on an eCos port for a PowerPC MPC860T
>> > based board. On the board is a simple "load and go"
>> > bootstrapper doing simple board initialization.
>> > 
>> > Serial ports under eCos are not yet working, but
>> > i have blinking leds (based on simple hello.c).
>> > 
>> > Then i started to try this with two threads.
>> > My problem is, that enabling the interrupts
>> > (in Cyg_Interrupt::enable_interrupts(); -> MSR[EE]=1)
>> > never returns. 
>> > 
>> > Any idea, where to start?
>> > 
>> > best regards
>> > Christoph
>> > 
> best regards, Christoph

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

end of thread, other threads:[~2001-05-02  8:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26  2:58 [ECOS] Enabling Interrupts Christoph Csebits
2001-04-26  3:24 ` Linus Nielsen Feltzing
2001-05-02  7:39   ` Christoph Csebits
2001-05-02  8:28     ` Gary Thomas
2001-04-26  4:30 ` Hugo Tyson

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