public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* IRQ-Enable in ARM-Target (cpsr)
@ 2008-12-05 22:31 Martin Laabs
  2008-12-05 22:49 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Laabs @ 2008-12-05 22:31 UTC (permalink / raw)
  To: ecos-devel

Hi,

I'm currently searching the bug that prevents the STRG-C break of
the GDB stub. (LPC2294) I discovered that the (global) IRQ-Disable 
bit in  the cpsr register is set. Because of that the STRG-C interrupt
of  the debug channel is unable to occure.
I searched in the whole code but did not found the part where this
IRQ-Disable bit (bit 7) is cleared.
Maybe you have a hint for me? Where should I add the patch for that?
In the cyg_hal_plf_serial_init() function? (The HAL_INTERRUPT_(U)MASK
functions work only with the interrupt controller)
Whats about the other packages that uses the interrupts? (I currently
use the minimal config to search the bug.) Where and when do they disable
the global interrupt-disable flag?

Thank you,
 Martin L.

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

* Re: IRQ-Enable in ARM-Target (cpsr)
  2008-12-05 22:31 IRQ-Enable in ARM-Target (cpsr) Martin Laabs
@ 2008-12-05 22:49 ` Gary Thomas
  2008-12-05 23:16   ` Martin Laabs
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2008-12-05 22:49 UTC (permalink / raw)
  To: Martin Laabs; +Cc: ecos-devel

Martin Laabs wrote:
> Hi,
> 
> I'm currently searching the bug that prevents the STRG-C break of
> the GDB stub. (LPC2294) I discovered that the (global) IRQ-Disable 
> bit in  the cpsr register is set. Because of that the STRG-C interrupt
> of  the debug channel is unable to occure.
> I searched in the whole code but did not found the part where this
> IRQ-Disable bit (bit 7) is cleared.
> Maybe you have a hint for me? Where should I add the patch for that?
> In the cyg_hal_plf_serial_init() function? (The HAL_INTERRUPT_(U)MASK
> functions work only with the interrupt controller)
> Whats about the other packages that uses the interrupts? (I currently
> use the minimal config to search the bug.) Where and when do they disable
> the global interrupt-disable flag?

This normally happens when you start running threads (call
the scheduler).

What sort of program are you trying to run (and use interrupts)?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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

* Re: IRQ-Enable in ARM-Target (cpsr)
  2008-12-05 22:49 ` Gary Thomas
@ 2008-12-05 23:16   ` Martin Laabs
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Laabs @ 2008-12-05 23:16 UTC (permalink / raw)
  To: ecos-devel

Hi,

>> Whats about the other packages that uses the interrupts? (I currently
>> use the minimal config to search the bug.) Where and when do they disable
>> the global interrupt-disable flag?
>
> This normally happens when you start running threads (call
> the scheduler).
>
> What sort of program are you trying to run (and use interrupts)?

OK - the whole story. I build redboot and noticed that the STRG-C
break of the GDB stub was not working. Somewhat annoying but not
a problem I have to solve now - I thougt. But after I tried to load
and run an application into the RAM I got an assert concerning a DSR
call with a function pointer pointing to null. (The same progam runs
in ROM mode without problems.)

I've guessed that there is something messed up with the
virtual vectors and/or the interrupt handling.

This is the reason why I search for the missing STRG-C break support
since this bug might generate all these side effects. (And I do not
search one bug if I know that there is another one that might interact
each other.)

To simplify the bug-search I build a minimal configuration of the
HAL, added the GDB-stub support and wrote just a diag_printf("Hello World\n");
while(1); into cyg_user_start().

If I understand you correct the HAL will not enable the interrupts at
all. This would mean that the gdb-break support does not work with
any target in HAL-only configurations. (And whats about RedBoot? As far
as I know it uses only the HAL, not the kernel sheduling.)

Thank you,
Martin L.

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

end of thread, other threads:[~2008-12-05 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-05 22:31 IRQ-Enable in ARM-Target (cpsr) Martin Laabs
2008-12-05 22:49 ` Gary Thomas
2008-12-05 23:16   ` Martin Laabs

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