public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] qustion about GDB
@ 2001-03-22  2:41 james chen
  2001-03-22  2:54 ` Jesper Skov
  0 siblings, 1 reply; 10+ messages in thread
From: james chen @ 2001-03-22  2:41 UTC (permalink / raw)
  To: Jesper Skov; +Cc: ecos-discuss

>>>>>> "james" == james chen <james_ch1@sina.com> writes:

>>> >>>>> "james" == james chen <james_ch1@sina.com> writes:
>james>     the target is ARM

>And the platform?
a custom test board  based on ARM7TDMI, I have port eCos to it. but when I
debug redboot with Multi-ICE, I found that the IRQ interrupt, I am not very
sure that GDB has send CTRL-C to redboot. I have heard that GDB in cygwin
doesn't generate CTRL-C, is it right?

james chen



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

* Re: [ECOS] qustion about GDB
  2001-03-22  2:41 [ECOS] qustion about GDB james chen
@ 2001-03-22  2:54 ` Jesper Skov
  2001-03-23 19:02   ` james chen
  0 siblings, 1 reply; 10+ messages in thread
From: Jesper Skov @ 2001-03-22  2:54 UTC (permalink / raw)
  To: james chen; +Cc: Jesper Skov, ecos-discuss

>>>>> "james" == james chen <james_ch1@sina.com> writes:

>>>>>>> "james" == james chen <james_ch1@sina.com> writes:
>>>> >>>>> "james" == james chen <james_ch1@sina.com> writes:
james> the target is ARM

>> And the platform?
james> a custom test board based on ARM7TDMI, I have port eCos to
james> it. but when I debug redboot with Multi-ICE, I found that the
james> IRQ interrupt, I am not very sure that GDB has send CTRL-C to
james> redboot. I have heard that GDB in cygwin doesn't generate
james> CTRL-C, is it right?

I think there once was a problem with bash eating ctrl-c signals, but
I think that should have been resolved.

If you wrote the port yourself, did you do the right things in the
driver to enable RX interrupts? Otherwise I have no ideas.

Jesper

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

* Re: [ECOS] qustion about GDB
  2001-03-22  2:54 ` Jesper Skov
@ 2001-03-23 19:02   ` james chen
  2001-03-23 22:58     ` Jesper Skov
  0 siblings, 1 reply; 10+ messages in thread
From: james chen @ 2001-03-23 19:02 UTC (permalink / raw)
  To: Jesper Skov; +Cc: Jesper Skov, ecos-discuss

       I have found the reason, it is that the IRQ bit is disable in Current
Progarm Staus Register(CPSR). I have check the vectors.S in arm/arch, I
don't find any code to re-enable IRQ in CPSR, where can I have a chance to
re-enable it in my platform code?

      it seem that eCos will run in supervisor mode between OS and
Applications. but I want  OS  running in supervisor mode and Applications
running in user mode, how to change it? Will eCos support this in future?

Best Regards,
james chen


> >>>>> "james" == james chen <james_ch1@sina.com> writes:
>
> >>>>>>> "james" == james chen <james_ch1@sina.com> writes:
> >>>> >>>>> "james" == james chen <james_ch1@sina.com> writes:
> james> the target is ARM
>
> >> And the platform?
> james> a custom test board based on ARM7TDMI, I have port eCos to
> james> it. but when I debug redboot with Multi-ICE, I found that the
> james> IRQ interrupt, I am not very sure that GDB has send CTRL-C to
> james> redboot. I have heard that GDB in cygwin doesn't generate
> james> CTRL-C, is it right?
>
> I think there once was a problem with bash eating ctrl-c signals, but
> I think that should have been resolved.
>
> If you wrote the port yourself, did you do the right things in the
> driver to enable RX interrupts? Otherwise I have no ideas.
>
> Jesper
>
>


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

* Re: [ECOS] qustion about GDB
  2001-03-23 19:02   ` james chen
@ 2001-03-23 22:58     ` Jesper Skov
  2001-03-24  0:33       ` james chen
  2001-03-24  8:45       ` Grant Edwards
  0 siblings, 2 replies; 10+ messages in thread
From: Jesper Skov @ 2001-03-23 22:58 UTC (permalink / raw)
  To: james chen; +Cc: ecos-discuss

>>>>> "james" == james chen <james_ch1@sina.com> writes:

james>        I have found the reason, it is that the IRQ bit is
james> disable in Current Progarm Staus Register(CPSR). I have check
james> the vectors.S in arm/arch, I don't find any code to re-enable
james> IRQ in CPSR, where can I have a chance to re-enable it in my
james> platform code?

It should be enabled in the ctrlc init code - if that is configured
into your system. Look for this in vectors.S:

#if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \
    || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)
        .extern hal_ctrlc_isr_init
        bl      hal_ctrlc_isr_init
#endif

james>       it seem that eCos will run in supervisor mode between OS
james> and Applications. but I want OS running in supervisor mode and
james> Applications running in user mode, how to change it? Will eCos
james> support this in future?

That is unlikely to ever happen - eCos application needs to be able to
use HAL cache and interrupt macros which cannot be used from user
mode.

jesper

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

* Re: [ECOS] qustion about GDB
  2001-03-23 22:58     ` Jesper Skov
@ 2001-03-24  0:33       ` james chen
  2001-03-24  8:45       ` Grant Edwards
  1 sibling, 0 replies; 10+ messages in thread
From: james chen @ 2001-03-24  0:33 UTC (permalink / raw)
  To: Jesper Skov; +Cc: ecos-discuss

Thanks. I have written an example, it has two threads, I use insight5.0 and
redboot. but it will be no response in running the code
Cyg_Interrupt::enable_interrupts()( called by Cyg_Scheduler::start in
sched.cxx line 313).

> >>>>> "james" == james chen <james_ch1@sina.com> writes:
>
> james>        I have found the reason, it is that the IRQ bit is
> james> disable in Current Progarm Staus Register(CPSR). I have check
> james> the vectors.S in arm/arch, I don't find any code to re-enable
> james> IRQ in CPSR, where can I have a chance to re-enable it in my
> james> platform code?
>
> It should be enabled in the ctrlc init code - if that is configured
> into your system. Look for this in vectors.S:
>
> #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \
>     || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT)
>         .extern hal_ctrlc_isr_init
>         bl      hal_ctrlc_isr_init
> #endif
>
> james>       it seem that eCos will run in supervisor mode between OS
> james> and Applications. but I want OS running in supervisor mode and
> james> Applications running in user mode, how to change it? Will eCos
> james> support this in future?
>
> That is unlikely to ever happen - eCos application needs to be able to
> use HAL cache and interrupt macros which cannot be used from user
> mode.
>
> jesper
>
>


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

* Re: [ECOS] qustion about GDB
  2001-03-23 22:58     ` Jesper Skov
  2001-03-24  0:33       ` james chen
@ 2001-03-24  8:45       ` Grant Edwards
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Edwards @ 2001-03-24  8:45 UTC (permalink / raw)
  To: Jesper Skov; +Cc: james chen, ecos-discuss

On Sat, Mar 24, 2001 at 07:58:12AM +0100, Jesper Skov wrote:

> james>       it seem that eCos will run in supervisor mode between OS
> james> and Applications. but I want OS running in supervisor mode and
> james> Applications running in user mode, how to change it? Will eCos
> james> support this in future?
> 
> That is unlikely to ever happen - eCos application needs to be able to
> use HAL cache and interrupt macros which cannot be used from user
> mode.

Unless you got an MMU you've got a single, global address
space, and I don't really see the benefit of running in user
mode.

-- 
Grant Edwards
grante@visi.com

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

* Re: [ECOS] qustion about GDB
  2001-03-22  2:29   ` james chen
@ 2001-03-22  2:30     ` Jesper Skov
  0 siblings, 0 replies; 10+ messages in thread
From: Jesper Skov @ 2001-03-22  2:30 UTC (permalink / raw)
  To: james chen; +Cc: Jesper Skov, ecos-discuss

>>>>> "james" == james chen <james_ch1@sina.com> writes:

>> >>>>> "james" == james chen <james_ch1@sina.com> writes:
james>     the target is ARM

And the platform?

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

* Re: [ECOS] qustion about GDB
  2001-03-22  2:19 ` Jesper Skov
@ 2001-03-22  2:29   ` james chen
  2001-03-22  2:30     ` Jesper Skov
  0 siblings, 1 reply; 10+ messages in thread
From: james chen @ 2001-03-22  2:29 UTC (permalink / raw)
  To: Jesper Skov; +Cc: ecos-discuss

> >>>>> "james" == james chen <james_ch1@sina.com> writes:
> 
> james> It will send the char to UART1, not UART2, why?
> 
> You need to use the DEBUG channel.
I will try!
> 
> james> another question, I have enable
> james> CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT, but I can't stop running. I
> james> am use eCos snapshot version, and insight5.0 running in
> james> cygwin. I found that When I pressed CTRL-C in GDB, redboot
> james> doesn't received IRQ interrupt.
> 
> What target is this?
> 
    the target is ARM

james


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

* Re: [ECOS] qustion about GDB
  2001-03-22  2:04 james chen
@ 2001-03-22  2:19 ` Jesper Skov
  2001-03-22  2:29   ` james chen
  0 siblings, 1 reply; 10+ messages in thread
From: Jesper Skov @ 2001-03-22  2:19 UTC (permalink / raw)
  To: james chen; +Cc: ecos-discuss

>>>>> "james" == james chen <james_ch1@sina.com> writes:

james> It will send the char to UART1, not UART2, why?

You need to use the DEBUG channel.

james> another question, I have enable
james> CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT, but I can't stop running. I
james> am use eCos snapshot version, and insight5.0 running in
james> cygwin. I found that When I pressed CTRL-C in GDB, redboot
james> doesn't received IRQ interrupt.

What target is this?

Jesper



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

* [ECOS] qustion about GDB
@ 2001-03-22  2:04 james chen
  2001-03-22  2:19 ` Jesper Skov
  0 siblings, 1 reply; 10+ messages in thread
From: james chen @ 2001-03-22  2:04 UTC (permalink / raw)
  To: ecos-discuss

Hi,

    I have two UARTs in my test board, I used UART1 connect to GDB, and the
other for diagnostic,  I want to trap the packages which GDB send to redboot
and send it to UART2. I use the following code:

void output_gdb_protocol( char c )
{
     hal_virtual_comm_table_t *__chan;
     __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
     CYGACC_COMM_IF_PUTC(*__chan, c);
}

It will send the char to UART1, not UART2, why?

another question, I have enable CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT, but I
can't stop running. I am use eCos snapshot version, and insight5.0 running
in cygwin. I found that When I pressed CTRL-C in GDB, redboot doesn't
received IRQ interrupt.

james chen



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

end of thread, other threads:[~2001-03-24  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-22  2:41 [ECOS] qustion about GDB james chen
2001-03-22  2:54 ` Jesper Skov
2001-03-23 19:02   ` james chen
2001-03-23 22:58     ` Jesper Skov
2001-03-24  0:33       ` james chen
2001-03-24  8:45       ` Grant Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-03-22  2:04 james chen
2001-03-22  2:19 ` Jesper Skov
2001-03-22  2:29   ` james chen
2001-03-22  2:30     ` Jesper Skov

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