public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] POSIX threads in ecos
@ 2001-08-13  7:48 Rajeev
  2001-08-13  8:04 ` [ECOS] Serial Driver Sebastien ANDRE
  2001-08-13 14:16 ` [ECOS] POSIX threads in ecos Jonathan Larmour
  0 siblings, 2 replies; 14+ messages in thread
From: Rajeev @ 2001-08-13  7:48 UTC (permalink / raw)
  To: ecos-discuss

hi,
  i'm trying out the posix threads in ecos. i've three threads running a
simple program.
  when i dont use the sleep call the threads run happily though not to
the priorities i've set .
  but when i use the sleep call the output i get is
thread1:hello world
thread2:hello world
thread3:hello world
thread1:hello world
thread2:hello world
thread3:hello world
   >>>>and then the system does nothing.
	i'm using an ARM7 based board and i have configured one of its timers
for the scheduler to use and i'm using a basic tick of 0.5 secs
what might be the problem??

thanks for all help
rajeev

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

* [ECOS] Serial Driver
  2001-08-13  7:48 [ECOS] POSIX threads in ecos Rajeev
@ 2001-08-13  8:04 ` Sebastien ANDRE
  2001-08-13 14:16 ` [ECOS] POSIX threads in ecos Jonathan Larmour
  1 sibling, 0 replies; 14+ messages in thread
From: Sebastien ANDRE @ 2001-08-13  8:04 UTC (permalink / raw)
  To: egcs; +Cc: ecos-discuss

Hi everybody !!


So i start a port of redboot, i need to redefines the serial driver

My custom board use a 16C750 UART (IRDA but not used as IRDA)
Somebody had already port it ? how must make it ? any guide lines ?

thx in advance !!

best regards,
Sebastien.


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

* Re: [ECOS] POSIX threads in ecos
  2001-08-13  7:48 [ECOS] POSIX threads in ecos Rajeev
  2001-08-13  8:04 ` [ECOS] Serial Driver Sebastien ANDRE
@ 2001-08-13 14:16 ` Jonathan Larmour
  2001-08-13 22:29   ` Rajeev S
  1 sibling, 1 reply; 14+ messages in thread
From: Jonathan Larmour @ 2001-08-13 14:16 UTC (permalink / raw)
  To: Rajeev; +Cc: ecos-discuss

Rajeev wrote:
> 
> hi,
>   i'm trying out the posix threads in ecos. i've three threads running a
> simple program.
>   when i dont use the sleep call the threads run happily though not to
> the priorities i've set .
>   but when i use the sleep call the output i get is
> thread1:hello world
> thread2:hello world
> thread3:hello world
> thread1:hello world
> thread2:hello world
> thread3:hello world
>    >>>>and then the system does nothing.
>         i'm using an ARM7 based board and i have configured one of its timers
> for the scheduler to use and i'm using a basic tick of 0.5 secs
> what might be the problem??

What's the program? I should warn you that these multi-threading problems
are non-trivial to track down, and therefore aren't the type of thing I
would find for you (not a paying customer y'see). If I don't see anything
glaringly obvious in the program, you'll just have to debug it I'm afraid.

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

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

* Re: [ECOS] POSIX threads in ecos
  2001-08-13 14:16 ` [ECOS] POSIX threads in ecos Jonathan Larmour
@ 2001-08-13 22:29   ` Rajeev S
  0 siblings, 0 replies; 14+ messages in thread
From: Rajeev S @ 2001-08-13 22:29 UTC (permalink / raw)
  To: Rajeev S; +Cc: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]

hi ,
 this is the program i'm trying to debug, see if you could help?
thanks
rajeev
----- Original Message -----
From: "Jonathan Larmour" <jlarmour@redhat.com>
To: "Rajeev" <rajeev@inablers.net>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Tuesday, August 14, 2001 2:45 iNabler
Subject: Re: [ECOS] POSIX threads in ecos


> Rajeev wrote:
> >
> > hi,
> >   i'm trying out the posix threads in ecos. i've three threads running a
> > simple program.
> >   when i dont use the sleep call the threads run happily though not to
> > the priorities i've set .
> >   but when i use the sleep call the output i get is
> > thread1:hello world
> > thread2:hello world
> > thread3:hello world
> > thread1:hello world
> > thread2:hello world
> > thread3:hello world
> >    >>>>and then the system does nothing.
> >         i'm using an ARM7 based board and i have configured one of its
timers
> > for the scheduler to use and i'm using a basic tick of 0.5 secs
> > what might be the problem??
>
> What's the program? I should warn you that these multi-threading problems
> are non-trivial to track down, and therefore aren't the type of thing I
> would find for you (not a paying customer y'see). If I don't see anything
> glaringly obvious in the program, you'll just have to debug it I'm afraid.
>
> 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



[-- Attachment #2: posix.c --]
[-- Type: text/x-c, Size: 1906 bytes --]

#include <cyg/posix/pthread.h>
#include <signal.h>
#include <cyg/posix/types.h>
#include <cyg/hal/debug.h>
#define NUM_THREADS     3

pthread_mutex_t clib;

char thread_stacks[3][PTHREAD_STACK_MIN * 2];

void *PrintHello(void *threadid)
{
	int i;
	for(;;){
//		pthread_mutex_lock(&clib);
		disp("Hello World!");		//i still dont have the printfs on my platform
		disp_tag((int)threadid);	//just my own debug statements
//		pthread_mutex_unlock(&clib);
		i = sleep(1);
		if(i) {
			disp("return value from sleep()");
			disp_tag(i);
		}
	}
}

int main()
{
   pthread_t threads[NUM_THREADS];
   int rc, t;
	pthread_attr_t attr[NUM_THREADS];
	struct sched_param sched[NUM_THREADS];
	sched[0].sched_priority = 10;
	sched[1].sched_priority = 20;
	sched[2].sched_priority = 30;
	pthread_mutex_init(&clib, NULL);

	for(t=0;t < NUM_THREADS;t++){
		rc =  pthread_attr_init(&attr[t]);
		if(rc){
			disp("ERROR: return code from pthread_attr_init");
			disp_tag(rc);
		}	
   }
		
   for(t=0;t < NUM_THREADS;t++){
		rc = pthread_attr_setstackaddr( &attr, (void *)&thread_stacks[t][sizeof(thread_stacks[t])] );
		if(rc){
	   	disp("ERROR; return code from pthread_attr_setstackaddr() ");
			disp_tag(rc);
		}
      rc = pthread_attr_setstacksize( &attr, sizeof(thread_stacks[t]) );
		if(rc){
	   	disp("ERROR; return code from pthread_attr_setstacksize() ");
			disp_tag(rc);
		}
		rc = pthread_attr_setschedpolicy(&attr[t], SCHED_RR);
		if(rc){
	   	disp("ERROR; return code from pthread_attr_schedpolicy() ");
			disp_tag(rc);
		}		
		rc = pthread_attr_setschedparam(&attr[t], &sched[t]);
		if(rc){
	   	disp("ERROR; return code from pthread_attr_schedparam() ");
			disp_tag(rc);
		}
   	rc = pthread_create(&threads[t], &attr[t], PrintHello, (void *)t);
   	if (rc){
	   	disp("ERROR; return code from pthread_create() ");
			disp_tag(rc);
   	}
   }
	rc = pause();
	if(rc != -1){
		disp("ERROR:from pause()");
	}
}

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

* Re: [ECOS] Serial driver
  2006-08-14  8:43         ` Tathagata Das
@ 2006-08-14  9:33           ` Andrew Lunn
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Lunn @ 2006-08-14  9:33 UTC (permalink / raw)
  To: Tathagata Das; +Cc: ecos-discuss

On Mon, Aug 14, 2006 at 02:05:15PM +0530, Tathagata Das wrote:
> Hi Andrew,
> Thank you very much for your reply.
> For my problem 1 :
>  You are right. I want to echo that character. Please tell me how can I 
> enable echo.

Read the documentation i pointed to.

The layer /dev/ser0 is a generic serial driver which you can build
anything over, eg slip, ppp, custom protocols, or tty drivers. What
you want is a tty driver, so you need the tty layer.

     Andrew

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

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

* Re: [ECOS] Serial driver
  2006-08-14  7:17       ` Andrew Lunn
@ 2006-08-14  8:43         ` Tathagata Das
  2006-08-14  9:33           ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Tathagata Das @ 2006-08-14  8:43 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,
Thank you very much for your reply.
For my problem 1 :
  You are right. I want to echo that character. Please tell me how can I 
enable echo.
I am not using any tty layer.
I am sending you DEVTAB_ENTRY for your reference.

DEVTAB_ENTRY(   test_serial_iol,
                /dev/ser0,
                0,
                &cyg_io_serial_devio,
                test_serial_init,
                test_serial_lookup,     // Serial driver may need 
initializing
                &test_serial_channel
    );
I only use this single entry. Hope , i do not need two entries (one for 
RX and one for TX). Single entry should be good enough.

Also      CYGDAT_IO_SERIAL_TTY_CONSOLE = /dev/ser0
Please tell me how can I use tty layer so that I get the echo support.

For my problem 2 :
Yes you are again right. It tries to read a block. But why ?
My scanf is like this  ---- scanf("%c", &c); SO it should try to read 
single character.
But i have noticed that size = 256 in "while (size< *len) {".
Please tell me why the control does not come out and why I am not able 
to print the value of variable 'c'.

Thanks in advance

Regards,
Tatha

   

Andrew Lunn wrote:

>On Mon, Aug 14, 2006 at 11:35:32AM +0530, Tathagata Das wrote:
>  
>
>>Hi ,
>>       I am using two different IRQ number for RX and TX in serial driver.
>>
>>My init function of serial driver looks like this ---
>>
>>static bool test_serial_init(struct cyg_devtab_entry *tab)
>>{
>>       serial_channel *chan = (serial_channel *)tab->priv;
>>       (chan->callbacks->serial_init)(chan);  // Really only required 
>>for interrupt driven devices
>>
>>       /* Allocate the IRQs */
>>       if (chan->out_cbuf.len != 0) {
>>               /* TX interrupt */
>>               cyg_drv_interrupt_create(TX_IRQ,
>>                                        0,                             
>>// IRQ priority
>>                                        (cyg_addrword_t)chan,          
>>// Data item passed to interrupt handler
>>                                        &test_tx_serial_ISR,
>>                                        &test_tx_serial_DSR,
>>                                        &tx_serial_interrupt_handle,
>>                                        &tx_serial_interrupt);
>>               cyg_drv_interrupt_attach(tx_serial_interrupt_handle);
>>               cyg_drv_interrupt_unmask(TX_IRQ);
>>       }
>>       if (chan->in_cbuf.len != 0) {
>>               /* RX interrupt */
>>               cyg_drv_interrupt_create(RX_IRQ,
>>                                        0,                             
>>// IRQ priority
>>                                        (cyg_addrword_t)chan,          
>>// Data item passed to interrupt handler
>>                                        &test_rx_serial_ISR,
>>                                        &test_rx_serial_DSR,
>>                                        &rx_serial_interrupt_handle,
>>                                        &rx_serial_interrupt);
>>               cyg_drv_interrupt_attach(rx_serial_interrupt_handle);
>>               cyg_drv_interrupt_unmask(RX_IRQ);
>>       }
>>
>>       return true;
>>}
>>
>>My problems are :
>>
>>         1. when I press any key from keyboard test_rx_serial_ISR and 
>>test_rx_serial_DSR are called one by one.
>>               But that charcter is not displayed.
>>    
>>
>
>You mean there is no echo? Do you have echo'ing enabled? Are you even
>using the tty layer in eCos which provides echo support?
>
>  
>
>>         2.  In scanf function --- control is stuck into " while (size 
>>< *len) {" this loop in serial_read function.
>>    
>>
> 
>So this layer is trying to read a block of charactors, not a single
>charactor read. Nothing wrong here.
>
>You might want to read more of 
>http://ecos.sourceware.org/docs-latest/ref/io-serial-driver-details.html
>
>It sounds like you want to use the tty driver.
>
>   Andrew
>  
>

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

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

* Re: [ECOS] Serial driver
  2006-08-14  6:04     ` [ECOS] Serial driver Tathagata Das
@ 2006-08-14  7:17       ` Andrew Lunn
  2006-08-14  8:43         ` Tathagata Das
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Lunn @ 2006-08-14  7:17 UTC (permalink / raw)
  To: Tathagata Das; +Cc: ecos-discuss

On Mon, Aug 14, 2006 at 11:35:32AM +0530, Tathagata Das wrote:
> 
> Hi ,
>        I am using two different IRQ number for RX and TX in serial driver.
> 
> My init function of serial driver looks like this ---
> 
> static bool test_serial_init(struct cyg_devtab_entry *tab)
> {
>        serial_channel *chan = (serial_channel *)tab->priv;
>        (chan->callbacks->serial_init)(chan);  // Really only required 
> for interrupt driven devices
> 
>        /* Allocate the IRQs */
>        if (chan->out_cbuf.len != 0) {
>                /* TX interrupt */
>                cyg_drv_interrupt_create(TX_IRQ,
>                                         0,                             
> // IRQ priority
>                                         (cyg_addrword_t)chan,          
> // Data item passed to interrupt handler
>                                         &test_tx_serial_ISR,
>                                         &test_tx_serial_DSR,
>                                         &tx_serial_interrupt_handle,
>                                         &tx_serial_interrupt);
>                cyg_drv_interrupt_attach(tx_serial_interrupt_handle);
>                cyg_drv_interrupt_unmask(TX_IRQ);
>        }
>        if (chan->in_cbuf.len != 0) {
>                /* RX interrupt */
>                cyg_drv_interrupt_create(RX_IRQ,
>                                         0,                             
> // IRQ priority
>                                         (cyg_addrword_t)chan,          
> // Data item passed to interrupt handler
>                                         &test_rx_serial_ISR,
>                                         &test_rx_serial_DSR,
>                                         &rx_serial_interrupt_handle,
>                                         &rx_serial_interrupt);
>                cyg_drv_interrupt_attach(rx_serial_interrupt_handle);
>                cyg_drv_interrupt_unmask(RX_IRQ);
>        }
> 
>        return true;
> }
> 
> My problems are :
> 
>          1. when I press any key from keyboard test_rx_serial_ISR and 
> test_rx_serial_DSR are called one by one.
>                But that charcter is not displayed.

You mean there is no echo? Do you have echo'ing enabled? Are you even
using the tty layer in eCos which provides echo support?

>          2.  In scanf function --- control is stuck into " while (size 
> < *len) {" this loop in serial_read function.
 
So this layer is trying to read a block of charactors, not a single
charactor read. Nothing wrong here.

You might want to read more of 
http://ecos.sourceware.org/docs-latest/ref/io-serial-driver-details.html

It sounds like you want to use the tty driver.

   Andrew

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

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

* [ECOS] Serial driver
  2006-08-11 11:47   ` Gary Thomas
@ 2006-08-14  6:04     ` Tathagata Das
  2006-08-14  7:17       ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Tathagata Das @ 2006-08-14  6:04 UTC (permalink / raw)
  To: ecos-discuss


Hi ,
        I am using two different IRQ number for RX and TX in serial driver.

My init function of serial driver looks like this ---

static bool test_serial_init(struct cyg_devtab_entry *tab)
{
        serial_channel *chan = (serial_channel *)tab->priv;
        (chan->callbacks->serial_init)(chan);  // Really only required 
for interrupt driven devices

        /* Allocate the IRQs */
        if (chan->out_cbuf.len != 0) {
                /* TX interrupt */
                cyg_drv_interrupt_create(TX_IRQ,
                                         0,                             
// IRQ priority
                                         (cyg_addrword_t)chan,          
// Data item passed to interrupt handler
                                         &test_tx_serial_ISR,
                                         &test_tx_serial_DSR,
                                         &tx_serial_interrupt_handle,
                                         &tx_serial_interrupt);
                cyg_drv_interrupt_attach(tx_serial_interrupt_handle);
                cyg_drv_interrupt_unmask(TX_IRQ);
        }
        if (chan->in_cbuf.len != 0) {
                /* RX interrupt */
                cyg_drv_interrupt_create(RX_IRQ,
                                         0,                             
// IRQ priority
                                         (cyg_addrword_t)chan,          
// Data item passed to interrupt handler
                                         &test_rx_serial_ISR,
                                         &test_rx_serial_DSR,
                                         &rx_serial_interrupt_handle,
                                         &rx_serial_interrupt);
                cyg_drv_interrupt_attach(rx_serial_interrupt_handle);
                cyg_drv_interrupt_unmask(RX_IRQ);
        }

        return true;
}

My problems are :

          1. when I press any key from keyboard test_rx_serial_ISR and 
test_rx_serial_DSR are called one by one.
                But that charcter is not displayed.
          2.  In scanf function --- control is stuck into " while (size 
< *len) {" this loop in serial_read function.

Here is my DSR for RX:

static void test_rx_serial_DSR(cyg_vector_t vector, cyg_ucount32 count, 
cyg_addrword_t data)
{
        serial_channel *chan = (serial_channel *)data;
        cyg_uint8 _c;
        unsigned int fifocnt;

        fifocnt = *FSTAT & RXFFLMASK;
        if(fifocnt--) {
                _c = *ASC_RBUF;
                (chan->callbacks->rcv_char)(chan, _c);
                /* I print this "_c" variable by diag_printf and I have 
seen it get correct key which I type from keyboard */

                /* RX happened ... so try to print that char */
                if(((*FSTAT & TXFFLMASK) >> TXFFLOFF) != TXFIFO_FULL) {
                        cbuf_t *tx_cbuf = &chan->out_cbuf;
                        diag_printf("TX: %d\n", tx_cbuf->nb);   /* I got 
0 here */
                        (chan->callbacks->xmt_char)(chan);  /* nothing 
is printed */
                }
        }

        cyg_drv_interrupt_unmask(RX_IRQ);
}

Thanks in advance

Regards,
Tatha


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

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

* Re: [ECOS] serial driver
@ 2003-07-18 10:29 Michael Anburaj
  0 siblings, 0 replies; 14+ messages in thread
From: Michael Anburaj @ 2003-07-18 10:29 UTC (permalink / raw)
  To: satish, ecos-discuss

Hi,

>  btw, how can i debug the serial driver..? to track the bug..!!

<a generic embedded debug issue> If you have a JTAG probe connected to the 
board, then you  can look at the memory contents at the SFR register 
locations for the UART & make sure that you have written the right values. 
If you are sure about register values <like control, baud_div & other UART 
setup registers>, then simply supply those values from the memory window of 
AXD or ADW. After this you can write into the UART_TX SFR location some hex 
number, like 0x41 & make sure the char appears on the serial terminal 
connected to the UART port. If this does not work, then you should work on a 
small project --writing ROMable code for you board & adding support like 
LEDs & serial stuff <without the MMU>.

FYI: Prior to this you should make sure you have turned off WDT (if any), 
interrupts, configure BUS parameters, Clock control & other board 
requirements.

-Mike.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


-- 
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] 14+ messages in thread

* [ECOS] serial driver
@ 2003-07-18  8:29 Satish Kumar
  0 siblings, 0 replies; 14+ messages in thread
From: Satish Kumar @ 2003-07-18  8:29 UTC (permalink / raw)
  To: ecos-discuss

Hi,
    i have built this redboot image for my arm926ej-s system board
which has a serial driver and ROM bootup. i have downloaded the 
redboot.bin in to the flash of the system board and trying to debug
the program using multiIce and ADS tool. 
    my hardware settings are correct and the uart program also seems
to be fine so far. i have also programmed the leds to know the break
in the flow.
             my program executes and remains in the loop where it is 
suppose to get user input after displaying "$Redboot>" hence it is in 
the infinite loop of the cyg_start func in redboot main.c

but, i see no output in my hyperterminal..my uart clk and all hardware
bits are set to proper value as required..the diagnostic output is
driven to the debug channel and my debug channel is configured to port
1..

i have no idea were can i be wrong, and what are the possibilities
to track the bug.

 now, if i burn the redboot.img file, my system just hangs, therez no
response...when power on..

 btw, how can i debug the serial driver..? to track the bug..!!


some one help me..its been a long time i m stuck in this prob..

satish


-- 
Satish Kumar <satish@bvt.sc.sanyo.co.jp>


-- 
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] 14+ messages in thread

* Re: [ECOS] serial driver
  2001-09-01 19:56 [ECOS] serial driver Chris C.
@ 2001-09-04  5:25 ` Jesper Skov
  0 siblings, 0 replies; 14+ messages in thread
From: Jesper Skov @ 2001-09-04  5:25 UTC (permalink / raw)
  To: Chris C.; +Cc: ecos-discuss

>>>>> "Chris" == Chris C <hksbtx@2bzd.com> writes:

Chris> Hi My target board is AT91EB40 but the source code is not same
Chris> as the Redhat eCos because I have done some port before eCos
Chris> support it.
[snip]

Please don't repeat questions. If they go unanswered, it's because
people didn't feel like answering them or didn't know the
answer. Repeating the question doesn't change that - and adds
unnecessary traffic to the list.

Thanks,
Jesper

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

* Re: [ECOS] Serial Driver
  2001-09-01  8:35 [ECOS] Serial Driver Chris C.
@ 2001-09-04  5:23 ` Jesper Skov
  0 siblings, 0 replies; 14+ messages in thread
From: Jesper Skov @ 2001-09-04  5:23 UTC (permalink / raw)
  To: Chris C.; +Cc: ecos-discuss

>>>>> "Chris" == Chris C <hksbtx@2bzd.com> writes:

Chris> I have wrote a testing program which have 2 threads, transmit
Chris> and receive, are used to test the full duplex of the target
Chris> board. In pc side, I have a serial testing program used to do
Chris> the testing. I did the 3 testing, 1. only transmit to pc (in
Chris> loop) 2. only receive from pc 3. transmit to (in loop) and
Chris> receive from pc (hold on the enter key to send a block of data)

Chris> In case 1 and 2, the serial driver can work fine but it can't
Chris> work in case 3. The problem occured in case 3 was that it can
Chris> work correctly within a short time and then it can't do the
Chris> transmit and receive. I use the Ctrl+C to break the program, I
Chris> always see it break in the idle_thread_main.

Chris> What is the possible problem that cause the program run into
Chris> this function?

Hard to say without seeing the code. But I probably wouldn't have time
to read it anyway.

Chris>  What is the best way to do the debugging?

How about running the serial tests that come with eCos? There's a
testing infrastructure that does what you try to do, and more. See the
io/serial/current/tests/README file - which is a bit out of date, but
should guide you in the right direction.

Jesper

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

* [ECOS] serial driver
@ 2001-09-01 19:56 Chris C.
  2001-09-04  5:25 ` Jesper Skov
  0 siblings, 1 reply; 14+ messages in thread
From: Chris C. @ 2001-09-01 19:56 UTC (permalink / raw)
  To: ecos-discuss

Hi
My target board is AT91EB40 but the source code is not same as the Redhat
eCos because I have done some port before eCos support it.

I have wrote a testing program which have 2 threads, transmit and receive,
are used to test the full duplex of the target board. In pc side, I have a
serial testing program used to do the testing. I did the 3 testing,
1. only transmit  to pc (in loop)
2. only receive from pc
3. transmit to (in loop) and receive from pc (hold on the enter key to send
a block of data)

In case 1 and 2, the serial driver can work fine but it can't work in case
3. The problem occured in case 3 was that it can work correctly within a
short time and then it can't do the transmit and receive. I use the Ctrl+C
to break the program, I always see it break in the idle_thread_main.

What is the possible problem that cause the program run into this function?
What is the best way to do the debugging?

Thanks!

----------------------------------------------------
Chris

_________________________________________________________________________
Sure, you can have free email. But free Email, Voicemail and Faxmail?
Check it out at http://www.2bzd.com

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

* [ECOS] Serial Driver
@ 2001-09-01  8:35 Chris C.
  2001-09-04  5:23 ` Jesper Skov
  0 siblings, 1 reply; 14+ messages in thread
From: Chris C. @ 2001-09-01  8:35 UTC (permalink / raw)
  To: ecos-discuss

Hi
My target board is AT91EB40 but the source code is not same as the Redhat
eCos because I have done some port before eCos support it.

I have wrote a testing program which have 2 threads, transmit and receive,
are used to test the full duplex of the target board. In pc side, I have a
serial testing program used to do the testing. I did the 3 testing,
1. only transmit  to pc (in loop)
2. only receive from pc
3. transmit to (in loop) and receive from pc (hold on the enter key to send
a block of data)

In case 1 and 2, the serial driver can work fine but it can't work in case
3. The problem occured in case 3 was that it can work correctly within a
short time and then it can't do the transmit and receive. I use the Ctrl+C
to break the program, I always see it break in the idle_thread_main.

What is the possible problem that cause the program run into this function?
What is the best way to do the debugging?

Thanks!

----------------------------------------------------
Chris

_________________________________________________________________________
Sure, you can have free email. But free Email, Voicemail and Faxmail?
Check it out at http://www.2bzd.com

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

end of thread, other threads:[~2006-08-14  9:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-13  7:48 [ECOS] POSIX threads in ecos Rajeev
2001-08-13  8:04 ` [ECOS] Serial Driver Sebastien ANDRE
2001-08-13 14:16 ` [ECOS] POSIX threads in ecos Jonathan Larmour
2001-08-13 22:29   ` Rajeev S
2001-09-01  8:35 [ECOS] Serial Driver Chris C.
2001-09-04  5:23 ` Jesper Skov
2001-09-01 19:56 [ECOS] serial driver Chris C.
2001-09-04  5:25 ` Jesper Skov
2003-07-18  8:29 Satish Kumar
2003-07-18 10:29 Michael Anburaj
2006-08-10 15:08 [ECOS] Multiple eCos repositories in ECOS_REPOSITORY Doyle, Patrick
2006-08-11 11:37 ` [ECOS] Problem with scanf and printf Tathagata Das
2006-08-11 11:47   ` Gary Thomas
2006-08-14  6:04     ` [ECOS] Serial driver Tathagata Das
2006-08-14  7:17       ` Andrew Lunn
2006-08-14  8:43         ` Tathagata Das
2006-08-14  9:33           ` Andrew Lunn

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