* RE: [ECOS] Multiple eCos repositories in ECOS_REPOSITORY
@ 2006-08-10 15:08 Doyle, Patrick
2006-08-11 11:37 ` [ECOS] Problem with scanf and printf Tathagata Das
0 siblings, 1 reply; 11+ messages in thread
From: Doyle, Patrick @ 2006-08-10 15:08 UTC (permalink / raw)
To: 'Andrew Lunn', ?yvind Harboe; +Cc: ecos-discuss
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Wednesday, August 09, 2006 5:11 PM
> To: ?yvind Harboe
> Cc: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Multiple eCos repositories in ECOS_REPOSITORY
>
>
> On Wed, Aug 09, 2006 at 10:31:21PM +0200, ?yvind Harboe wrote:
> > Does anyone feel like sharing a bit about how multiple eCos
> > repositories work w/ECOS_REPOSITORY?
> >
> > Is there any documentation anywhere?
> >
> > Will there be one ecos.db for each repository?
>
> This feature was added thus:
>
> 2003-03-26 Bart Veer <bartv@ecoscentric.com>
>
> * cdl.hxx, config.cxx.cxx, package.cxx:
> Update derived classes now that the repository is per-loadable
> rather than per-toplevel. Also turn ECOS_REPOSITORY into a
> path rather than a single directory, updating all affected
> database and config code.
>
> Searching ecos-patches i found an email from Bart:
>
> http://ecos.sourceware.org/ml/ecos-patches/2003-03/msg00195.html
>
> which says:
> ...
We use this feature all the time to keep our hal platform trees separate
from the CVS tree. The last time I looked, it wasn't supported in the GUI
tool, but it works fine with the command line tool.
--wpd
--
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] 11+ messages in thread
* [ECOS] Problem with scanf and printf
2006-08-10 15:08 [ECOS] Multiple eCos repositories in ECOS_REPOSITORY Doyle, Patrick
@ 2006-08-11 11:37 ` Tathagata Das
2006-08-11 11:47 ` Gary Thomas
0 siblings, 1 reply; 11+ messages in thread
From: Tathagata Das @ 2006-08-11 11:37 UTC (permalink / raw)
To: rcc, ecos-discuss
Hi ,
my scanf function is not working. Printf is working but after
cyg_thread_delay call it is not working too.
Here is my configuration :
CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE = "/dev/ser0"
CYGPKG_IO_SERIAL_TTY = 1
CYGPKG_IO_SERIAL_TTY_TTY0 = 0
In Serial driver DEVTAB_ENTRY is like this
DEVTAB_ENTRY( test_serial_iol,
"/dev/ser0",
0,
&cyg_io_serial_devio,
tes_serial_init,
test_serial_lookup, // Serial driver may need initializing
&test_serial_channel );
If anyone has any idea please give me.
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] 11+ messages in thread
* Re: [ECOS] Problem with scanf and printf
2006-08-11 11:37 ` [ECOS] Problem with scanf and printf Tathagata Das
@ 2006-08-11 11:47 ` Gary Thomas
2006-08-11 12:01 ` Tathagata Das
2006-08-14 6:04 ` [ECOS] Serial driver Tathagata Das
0 siblings, 2 replies; 11+ messages in thread
From: Gary Thomas @ 2006-08-11 11:47 UTC (permalink / raw)
To: Tathagata Das; +Cc: rcc, ecos-discuss
Tathagata Das wrote:
>
> Hi ,
> my scanf function is not working. Printf is working but after
> cyg_thread_delay call it is not working too.
>
> Here is my configuration :
> CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE =
> "/dev/ser0" CYGPKG_IO_SERIAL_TTY = 1
> CYGPKG_IO_SERIAL_TTY_TTY0 = 0
>
> In Serial driver DEVTAB_ENTRY is like this
>
> DEVTAB_ENTRY( test_serial_iol,
> "/dev/ser0",
> 0,
>
> &cyg_io_serial_devio,
> tes_serial_init,
>
> test_serial_lookup, // Serial driver may need initializing
>
> &test_serial_channel );
How can you expect any real help from a message like this?
You've not told us anything about your problems:
* What's the platform?
* Have you made modifications to eCos [your own drivers, HAL, etc]?
* How does 'scanf()' fail?
etc
Without details, your query is pretty useless :-(
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
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] 11+ messages in thread
* Re: [ECOS] Problem with scanf and printf
2006-08-11 11:47 ` Gary Thomas
@ 2006-08-11 12:01 ` Tathagata Das
2006-08-14 6:04 ` [ECOS] Serial driver Tathagata Das
1 sibling, 0 replies; 11+ messages in thread
From: Tathagata Das @ 2006-08-11 12:01 UTC (permalink / raw)
To: Gary Thomas; +Cc: rcc, ecos-discuss
Sorry for short of information.
It is a new platform on MIPS.
So HAL is written by me and it is new. I am also writing a Serial driver
for this new platform.
Printf is working if it is called from cyg_user_start function. But if I
create one thread from cyg_user_start and in that thread if i call
cyg_thread_delay
then after that print is not working. This is my problem number 1.
My second problem is scanf. I have noticed that when scanf is called,
serial_read (packages/io/serial/v2_0/src/common/serial.c) is called with
*len = 256.
Then cotrol stuck into the while loop (size < *len).
I tried to print out the value that I scanned but control does not come
out from scanf function.
Hope this time I am clear.
If you need any more information please tell me
Regards
Tatha
Gary Thomas wrote:
> Tathagata Das wrote:
>
>>
>> Hi ,
>> my scanf function is not working. Printf is working but after
>> cyg_thread_delay call it is not working too.
>>
>> Here is my configuration :
>> CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE =
>> "/dev/ser0" CYGPKG_IO_SERIAL_TTY = 1
>> CYGPKG_IO_SERIAL_TTY_TTY0 = 0
>>
>> In Serial driver DEVTAB_ENTRY is like this
>>
>> DEVTAB_ENTRY( test_serial_iol,
>> "/dev/ser0",
>> 0,
>>
>> &cyg_io_serial_devio,
>> tes_serial_init,
>>
>> test_serial_lookup, // Serial driver may need initializing
>>
>> &test_serial_channel );
>
>
> How can you expect any real help from a message like this?
> You've not told us anything about your problems:
> * What's the platform?
> * Have you made modifications to eCos [your own drivers, HAL, etc]?
> * How does 'scanf()' fail?
> etc
>
> Without details, your query is pretty useless :-(
>
--
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] 11+ messages in thread
* [ECOS] Serial driver
2006-08-11 11:47 ` Gary Thomas
2006-08-11 12:01 ` Tathagata Das
@ 2006-08-14 6:04 ` Tathagata Das
2006-08-14 7:17 ` Andrew Lunn
1 sibling, 1 reply; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ messages in thread
* Re: [ECOS] Serial driver
2006-08-14 8:43 ` Tathagata Das
@ 2006-08-14 9:33 ` Andrew Lunn
2006-08-14 9:51 ` [ECOS] Disk support in RedBoot? Andy Jackson
0 siblings, 1 reply; 11+ 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] 11+ messages in thread
* [ECOS] Disk support in RedBoot?
2006-08-14 9:33 ` Andrew Lunn
@ 2006-08-14 9:51 ` Andy Jackson
2006-08-14 11:14 ` Andrew Lunn
0 siblings, 1 reply; 11+ messages in thread
From: Andy Jackson @ 2006-08-14 9:51 UTC (permalink / raw)
To: ecos-discuss
I've been trying to enable disk support in RedBoot and it appears that some
of the components aren't present in the repository. For instance, the CDL
file references fs/iso9660fs.c if support for ISO9660 filesystems is
required, but there doesn't seem to be a file of that name. Similarly for
FAT support, the required pieces don't seem to be present (where are
CYGSEM_REDBOOT_DISK_FAT16 or redboot_fat16_funs defined for instance).
I'm sure that this is just me missing something obvious, so apologies in
advance and thank your for all help received.
Andy..
--
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] 11+ messages in thread
* Re: [ECOS] Disk support in RedBoot?
2006-08-14 9:51 ` [ECOS] Disk support in RedBoot? Andy Jackson
@ 2006-08-14 11:14 ` Andrew Lunn
2006-08-14 11:48 ` Gary Thomas
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2006-08-14 11:14 UTC (permalink / raw)
To: Andy Jackson; +Cc: ecos-discuss
On Mon, Aug 14, 2006 at 10:51:14AM +0100, Andy Jackson wrote:
> I've been trying to enable disk support in RedBoot and it appears that some
> of the components aren't present in the repository. For instance, the CDL
> file references fs/iso9660fs.c if support for ISO9660 filesystems is
> required, but there doesn't seem to be a file of that name.
If i remember correctly, there was something dodge with the copyright
for the ISO9660 support, so it never made it into anoncvs. Searching
the mail archive might reveal more. Maybe that CDL should be
removed....
> Similarly for
> FAT support, the required pieces don't seem to be present (where are
> CYGSEM_REDBOOT_DISK_FAT16 or redboot_fat16_funs defined for instance).
>
> I'm sure that this is just me missing something obvious, so apologies in
> advance and thank your for all help received.
If i understand the architecture of redboot correctly, there are two
ways to access filesystems.
I think you can just use the fileio layer to access any filesystem
which eCos supports via the fileio layer. So this should include FAT,
RAM, ROM and jffs2.
Or you can use simplied versions of filesystems which are built
directly into Redboot and just implement read only support. This is
how ext2 works. Looking at the code, some point in the past there must
of also been support for FAT, but it looks like it never made it into
the anoncvs repository. Maybe the x-Cygnus x-Redhat guys can say more.
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] 11+ messages in thread
* Re: [ECOS] Disk support in RedBoot?
2006-08-14 11:14 ` Andrew Lunn
@ 2006-08-14 11:48 ` Gary Thomas
0 siblings, 0 replies; 11+ messages in thread
From: Gary Thomas @ 2006-08-14 11:48 UTC (permalink / raw)
To: Andy Jackson, ecos-discuss
Andrew Lunn wrote:
> On Mon, Aug 14, 2006 at 10:51:14AM +0100, Andy Jackson wrote:
>> I've been trying to enable disk support in RedBoot and it appears that some
>> of the components aren't present in the repository. For instance, the CDL
>> file references fs/iso9660fs.c if support for ISO9660 filesystems is
>> required, but there doesn't seem to be a file of that name.
>
> If i remember correctly, there was something dodge with the copyright
> for the ISO9660 support, so it never made it into anoncvs. Searching
> the mail archive might reveal more. Maybe that CDL should be
> removed....
The initial ISO9660 stuff came along with the port to the PS/2, but it
was encumbered in some way by Sony and so we couldn't leave it it.
I think the CDL should stay, but require an implementation which
is not present. At least this way, if someone can ever contribute
real support, we'll have the place holders for how it should be done,
etc.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
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] 11+ messages in thread
end of thread, other threads:[~2006-08-14 11:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-11 12:01 ` Tathagata Das
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
2006-08-14 9:51 ` [ECOS] Disk support in RedBoot? Andy Jackson
2006-08-14 11:14 ` Andrew Lunn
2006-08-14 11:48 ` Gary Thomas
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).