public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0]
@ 2007-09-06 17:53 Jonathan Larmour
  2007-09-06 18:02 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Larmour @ 2007-09-06 17:53 UTC (permalink / raw)
  To: eCos discussion

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

The attached mail was misaddressed....

[-- Attachment #2: AT91SAM7S : cyg_io_write /dev/ser0 --]
[-- Type: message/rfc822, Size: 2702 bytes --]

From: <jc.caquet@kerlink.fr>
To: <ecos-discuss-owner@ecos.sourceware.org>
Subject: AT91SAM7S : cyg_io_write /dev/ser0
Date: Thu, 6 Sep 2007 18:58:50 +0200
Message-ID: <20070906165912.034A33FE4@jifvik.dyndns.org>

Dear all,
we use cyg_io_write on a serial device of AT91SAM7S board and when we try to
send only 1 character cyg_io_write fails and returns -1 as a result code.
Everything is OK as soon as we send more than 1 character, every character
is always successfully output.
Did anybody already face this problem ?

JC



[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

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

* Re: [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0]
  2007-09-06 17:53 [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0] Jonathan Larmour
@ 2007-09-06 18:02 ` Andrew Lunn
  2007-09-07  9:53   ` jc.caquet
       [not found]   ` <E1ITaXI-0005og-00@londo.lunn.ch>
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Lunn @ 2007-09-06 18:02 UTC (permalink / raw)
  To: eCos discussion

On Thu, Sep 06, 2007 at 06:52:46PM +0100, Jonathan Larmour wrote:
> The attached mail was misaddressed....

> From: jc.caquet@kerlink.fr
> To: ecos-discuss-owner@ecos.sourceware.org
> Subject: AT91SAM7S : cyg_io_write /dev/ser0
> Date: Thu, 6 Sep 2007 18:58:50 +0200
> X-Spam-Status: No, score=4.3 required=5.0 tests=AWL,BAYES_99,
> 	MSGID_FROM_MTA_ID,NO_REAL_NAME autolearn=no version=3.0.4
> 
> Dear all,
> we use cyg_io_write on a serial device of AT91SAM7S board and when we try to
> send only 1 character cyg_io_write fails and returns -1 as a result code.
> Everything is OK as soon as we send more than 1 character, every character
> is always successfully output.
> Did anybody already face this problem??

AT91 is one of the two drivers which make use the block transfers in
the serial layer. So maybe you are seeing a bug in this code?

comment out the 

implements    CYGINT_IO_SERIAL_BLOCK_TRANSFER

in arm/at91/current/cdl/ser_arm_at91.cdl

and then do an 

ecosconfig tree ; make ;

so that it does not to block transfers. Do you still get the same
problem?

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

* RE: [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0]
  2007-09-06 18:02 ` Andrew Lunn
@ 2007-09-07  9:53   ` jc.caquet
       [not found]   ` <E1ITaXI-0005og-00@londo.lunn.ch>
  1 sibling, 0 replies; 4+ messages in thread
From: jc.caquet @ 2007-09-07  9:53 UTC (permalink / raw)
  To: 'Andrew Lunn', 'eCos discussion'



-----Message d'origine-----
De : ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Andrew Lunn
Envoyé : jeudi 6 septembre 2007 19:03
À : eCos discussion
Objet : Re: [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0]

On Thu, Sep 06, 2007 at 06:52:46PM +0100, Jonathan Larmour wrote:
> The attached mail was misaddressed....

> From: jc.caquet@kerlink.fr
> To: ecos-discuss-owner@ecos.sourceware.org
> Subject: AT91SAM7S : cyg_io_write /dev/ser0
> Date: Thu, 6 Sep 2007 18:58:50 +0200
> X-Spam-Status: No, score=4.3 required=5.0 tests=AWL,BAYES_99,
> 	MSGID_FROM_MTA_ID,NO_REAL_NAME autolearn=no version=3.0.4
> 
> Dear all,
> we use cyg_io_write on a serial device of AT91SAM7S board and when we try
to
> send only 1 character cyg_io_write fails and returns -1 as a result code.
> Everything is OK as soon as we send more than 1 character, every character
> is always successfully output.
> Did anybody already face this problem??

AT91 is one of the two drivers which make use the block transfers in
the serial layer. So maybe you are seeing a bug in this code?

comment out the 

implements    CYGINT_IO_SERIAL_BLOCK_TRANSFER

in arm/at91/current/cdl/ser_arm_at91.cdl

and then do an 

ecosconfig tree ; make ;

so that it does not to block transfers. Do you still get the same
problem?

        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






OK, when doing so I get the following result when building ecos library :

packages/devs/serial/arm/at91/current/src/at91_serial.c:506: structure has
no member named `data_xmt_req'
packages/devs/serial/arm/at91/current/src/at91_serial.c: In function
`at91_serial_DSR':
packages/devs/serial/arm/at91/current/src/at91_serial.c:613: structure has
no member named `data_rcv_req'
/packages/devs/serial/arm/at91/current/src/at91_serial.c:624: structure has
no member named `data_rcv_done'
packages/devs/serial/arm/at91/current/src/at91_serial.c:647: structure has
no member named `data_xmt_done'
packages/devs/serial/arm/at91/current/src/at91_serial.c:652: structure has
no member named `data_xmt_req'

When CYGINT_IO_SERIAL_BLOCK_TRANSFER is not defined "_data_rcv_req,
_data_rcv_done, _data_xmt_req, _data_xmt_done" are excluded from structure
definition in serial.h. 
Do you think that some #if defined CYGINT_IO_SERIAL_BLOCK_TRANSFER are
missing in at91_serial.c ?

JC


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

* Re: [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0]
       [not found]   ` <E1ITaXI-0005og-00@londo.lunn.ch>
@ 2007-09-07 10:01     ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2007-09-07 10:01 UTC (permalink / raw)
  To: jc.caquet; +Cc: 'eCos discussion'

> OK, when doing so I get the following result when building ecos library :
> 
> packages/devs/serial/arm/at91/current/src/at91_serial.c:506: structure has
> no member named `data_xmt_req'
> packages/devs/serial/arm/at91/current/src/at91_serial.c: In function
> `at91_serial_DSR':
> packages/devs/serial/arm/at91/current/src/at91_serial.c:613: structure has
> no member named `data_rcv_req'
> /packages/devs/serial/arm/at91/current/src/at91_serial.c:624: structure has
> no member named `data_rcv_done'
> packages/devs/serial/arm/at91/current/src/at91_serial.c:647: structure has
> no member named `data_xmt_done'
> packages/devs/serial/arm/at91/current/src/at91_serial.c:652: structure has
> no member named `data_xmt_req'
> 
> When CYGINT_IO_SERIAL_BLOCK_TRANSFER is not defined "_data_rcv_req,
> _data_rcv_done, _data_xmt_req, _data_xmt_done" are excluded from structure
> definition in serial.h. 
> Do you think that some #if defined CYGINT_IO_SERIAL_BLOCK_TRANSFER are
> missing in at91_serial.c ?

It looks like it :-(

This is something to fix later.

I guess you will have to single step through the code and work out
what is happening....

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

end of thread, other threads:[~2007-09-07 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-06 17:53 [ECOS] [Fwd: AT91SAM7S : cyg_io_write /dev/ser0] Jonathan Larmour
2007-09-06 18:02 ` Andrew Lunn
2007-09-07  9:53   ` jc.caquet
     [not found]   ` <E1ITaXI-0005og-00@londo.lunn.ch>
2007-09-07 10:01     ` 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).