public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] shell application
@ 2005-09-17  8:52 Jaws
  2005-09-17 16:46 ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: Jaws @ 2005-09-17  8:52 UTC (permalink / raw)
  To: ecos-discuss

Hi all,
    in my application I need to implement a shell with some commands trough
serial o ethernet interface.
The principles purpose could be an easy and elementary user interface, but
it can also be used for debugging and diagnostic.
Can I have any suggestions about any framework or a easy way to implement a
shell or command interpreter in ecos.

During my search I found a ficl version for ECOS, called ZOG. Anyone knows a
source version adapted to the current ecos version? Or could you suggest
what i have to do to adapt the current ZOG version to ecos, to compile a
version for arm?

Thanks in advance
Jaws

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

* Re: [ECOS] shell application
  2005-09-17  8:52 [ECOS] shell application Jaws
@ 2005-09-17 16:46 ` Andrew Lunn
  2005-09-17 17:50   ` David N. Welton
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2005-09-17 16:46 UTC (permalink / raw)
  To: Jaws; +Cc: ecos-discuss

On Fri, Sep 16, 2005 at 11:56:05PM +0200, Jaws wrote:
> Hi all,
>     in my application I need to implement a shell with some commands trough
> serial o ethernet interface.
> The principles purpose could be an easy and elementary user interface, but
> it can also be used for debugging and diagnostic.
> Can I have any suggestions about any framework or a easy way to implement a
> shell or command interpreter in ecos.
> 
> During my search I found a ficl version for ECOS, called ZOG. Anyone knows a
> source version adapted to the current ecos version? Or could you suggest
> what i have to do to adapt the current ZOG version to ecos, to compile a
> version for arm?

The source code is available from David Welton's website. 

It has not been properly integrated into the eCos build system. It
currently uses a makefile to build ficl as an application which is
linked to eCos. It would be better to write a small amount of CDL and
incorperate it into the eCos build system. The makefile does not look
too complex so i think this would be easy.

Also note that ZOG is using an old version of ficl, version 3.x. The
current version at http://ficl.sourceforge.net/ is version 4.x. So you
might want to update the port.

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

* Re: [ECOS] shell application
  2005-09-17 16:46 ` Andrew Lunn
@ 2005-09-17 17:50   ` David N. Welton
  2005-09-17 18:13     ` Jaws
  0 siblings, 1 reply; 8+ messages in thread
From: David N. Welton @ 2005-09-17 17:50 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Andrew Lunn, Jaws

Andrew Lunn wrote:
> On Fri, Sep 16, 2005 at 11:56:05PM +0200, Jaws wrote:

>>During my search I found a ficl version for ECOS, called ZOG. Anyone knows a
>>source version adapted to the current ecos version? Or could you suggest
>>what i have to do to adapt the current ZOG version to ecos, to compile a
>>version for arm?

> The source code is available from David Welton's website. 

> It has not been properly integrated into the eCos build system. It
> currently uses a makefile to build ficl as an application which is
> linked to eCos. It would be better to write a small amount of CDL and
> incorperate it into the eCos build system. The makefile does not look
> too complex so i think this would be easy.

> Also note that ZOG is using an old version of ficl, version 3.x. The
> current version at http://ficl.sourceforge.net/ is version 4.x. So you
> might want to update the port.

If people are interested in this, I'd be more than willing to integrate
the changes into an updated version of Zog, although I don't really have
time to work on it a lot myself.  Well, if someone were willing to pay
for consulting time, that's a different story, but Zog was basically a
'fun learning project' that's run its course.

Another possibility might be my friend Salvatore's "jim interpreter"
which is a nice, small, modular version of Tcl:

http://jim.berlios.de

Saluti,
-- 
David N. Welton
- http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
- http://www.dedasys.com/

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

* Re: [ECOS] shell application
  2005-09-17 17:50   ` David N. Welton
@ 2005-09-17 18:13     ` Jaws
  2005-09-17 23:45       ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: Jaws @ 2005-09-17 18:13 UTC (permalink / raw)
  To: David N. Welton, ecos-discuss; +Cc: Andrew Lunn

Thanks David, Andrew

    I successfully ported the ZOG version in the actual ecos version and
compiled an application for arm.
I'll update the ficl used in ZOG with the last version from sourceforge.

A problem is still present. I created a test application ( starting form
testmain.c).
The problem is that executing the application from gdb the program run until
it mets the first fgets.
At this point it remains blocked. I think is a general problem that I have,
not related to this specific application.

Do you know any solution to this problem?

Thanks in advance
Jaws

----- Original Message -----
From: "David N. Welton" <davidw@dedasys.com>
To: <ecos-discuss@ecos.sourceware.org>
Cc: "Andrew Lunn" <andrew@lunn.ch>; "Jaws" <jaws75@tiscali.it>
Sent: Saturday, September 17, 2005 11:41 AM
Subject: Re: [ECOS] shell application


> Andrew Lunn wrote:
> > On Fri, Sep 16, 2005 at 11:56:05PM +0200, Jaws wrote:
>
> >>During my search I found a ficl version for ECOS, called ZOG. Anyone
knows a
> >>source version adapted to the current ecos version? Or could you suggest
> >>what i have to do to adapt the current ZOG version to ecos, to compile a
> >>version for arm?
>
> > The source code is available from David Welton's website.
>
> > It has not been properly integrated into the eCos build system. It
> > currently uses a makefile to build ficl as an application which is
> > linked to eCos. It would be better to write a small amount of CDL and
> > incorperate it into the eCos build system. The makefile does not look
> > too complex so i think this would be easy.
>
> > Also note that ZOG is using an old version of ficl, version 3.x. The
> > current version at http://ficl.sourceforge.net/ is version 4.x. So you
> > might want to update the port.
>
> If people are interested in this, I'd be more than willing to integrate
> the changes into an updated version of Zog, although I don't really have
> time to work on it a lot myself.  Well, if someone were willing to pay
> for consulting time, that's a different story, but Zog was basically a
> 'fun learning project' that's run its course.
>
> Another possibility might be my friend Salvatore's "jim interpreter"
> which is a nice, small, modular version of Tcl:
>
> http://jim.berlios.de
>
> Saluti,
> --
> David N. Welton
> - http://www.dedasys.com/davidw/
>
> Apache, Linux, Tcl Consulting
> - http://www.dedasys.com/

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

* Re: [ECOS] shell application
  2005-09-17 18:13     ` Jaws
@ 2005-09-17 23:45       ` Andrew Lunn
  2005-09-18  6:32         ` Jaws
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2005-09-17 23:45 UTC (permalink / raw)
  To: Jaws; +Cc: ecos-discuss

On Sat, Sep 17, 2005 at 06:36:12PM +0200, Jaws wrote:
> Thanks David, Andrew
> 
>     I successfully ported the ZOG version in the actual ecos version and
> compiled an application for arm.
> I'll update the ficl used in ZOG with the last version from sourceforge.
> 
> A problem is still present. I created a test application ( starting form
> testmain.c).
> The problem is that executing the application from gdb the program run until
> it mets the first fgets.
> At this point it remains blocked. I think is a general problem that I have,
> not related to this specific application.

What file descriptor is it trying to read from? Does it want it in raw
mode? cooked? etc? Which serial device are you using? /dev/ser0
/dev/tty0?  You have to use a different serial device to the one gdb
is using. 

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

* Re: [ECOS] shell application
  2005-09-17 23:45       ` Andrew Lunn
@ 2005-09-18  6:32         ` Jaws
  2005-09-18 17:59           ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: Jaws @ 2005-09-18  6:32 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,
    Usually I use the ethernet channel for gdb (but the same problem I saw
some times ago using gdb on the serial /dev/ttyS3).
When I run an application like one of the tests application, all of the
output messages are reported by default on the gdb console. the problem is
when an input is required; probably this makes a conflict with gdb
    In my application the command is this:
    fgets(in, nINBUF, stdin);
and it use the stdin. Probably it is assigned by default with the gdb
console.
How can I have to do to differentiate the input/output channel to have all
on the serial interface for example?

thanks
Jaws

----- Original Message -----
From: "Andrew Lunn" <andrew@lunn.ch>
To: "Jaws" <jaws75@tiscali.it>
Cc: <ecos-discuss@ecos.sourceware.org>
Sent: Saturday, September 17, 2005 6:46 PM
Subject: Re: [ECOS] shell application


> On Sat, Sep 17, 2005 at 06:36:12PM +0200, Jaws wrote:
> > Thanks David, Andrew
> >
> >     I successfully ported the ZOG version in the actual ecos version and
> > compiled an application for arm.
> > I'll update the ficl used in ZOG with the last version from sourceforge.
> >
> > A problem is still present. I created a test application ( starting form
> > testmain.c).
> > The problem is that executing the application from gdb the program run
until
> > it mets the first fgets.
> > At this point it remains blocked. I think is a general problem that I
have,
> > not related to this specific application.
>
> What file descriptor is it trying to read from? Does it want it in raw
> mode? cooked? etc? Which serial device are you using? /dev/ser0
> /dev/tty0?  You have to use a different serial device to the one gdb
> is using.
>
>         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
>


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

* Re: [ECOS] shell application
  2005-09-18  6:32         ` Jaws
@ 2005-09-18 17:59           ` Andrew Lunn
  2005-09-18 18:43             ` Jaws
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2005-09-18 17:59 UTC (permalink / raw)
  To: Jaws; +Cc: ecos-discuss

On Sat, Sep 17, 2005 at 07:50:21PM +0200, Jaws wrote:
> Hi Andrew,
>     Usually I use the ethernet channel for gdb (but the same problem I saw
> some times ago using gdb on the serial /dev/ttyS3).
> When I run an application like one of the tests application, all of the
> output messages are reported by default on the gdb console. the problem is
> when an input is required; probably this makes a conflict with gdb
>     In my application the command is this:
>     fgets(in, nINBUF, stdin);
> and it use the stdin. Probably it is assigned by default with the gdb
> console.
> How can I have to do to differentiate the input/output channel to have all
> on the serial interface for example?

You need to change the default console.

CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE 

It will be using /dev/ttydiag which is being directed to gdb. You need
to change this to one of your serial ports.

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

* Re: [ECOS] shell application
  2005-09-18 17:59           ` Andrew Lunn
@ 2005-09-18 18:43             ` Jaws
  0 siblings, 0 replies; 8+ messages in thread
From: Jaws @ 2005-09-18 18:43 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

HI Andrew,
    thanks for you suggestions, they were helpful.
I changed CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE into /dev/tty0 and I also did
some changes on serial device driver to enable the TTY mode on #0 and to
enable Hardware serial device driver for atmel At91 on the /dev/ser0.
    Running an example application, i.e. twothreads or serial, I have the
output redirected on the serial specified but after the first line the
serial is blocked.
    So, now I'm able to use the ttydiag for diagnostic and tty0 for the
input/output standard but this doesn't work properly yet.
Any idea or suggestion about this?

Thanks in advance
Jaws

----- Original Message -----
From: "Andrew Lunn" <andrew@lunn.ch>
To: "Jaws" <jaws75@tiscali.it>
Cc: <ecos-discuss@ecos.sourceware.org>
Sent: Saturday, September 17, 2005 8:13 PM
Subject: Re: [ECOS] shell application


> On Sat, Sep 17, 2005 at 07:50:21PM +0200, Jaws wrote:
> > Hi Andrew,
> >     Usually I use the ethernet channel for gdb (but the same problem I
saw
> > some times ago using gdb on the serial /dev/ttyS3).
> > When I run an application like one of the tests application, all of the
> > output messages are reported by default on the gdb console. the problem
is
> > when an input is required; probably this makes a conflict with gdb
> >     In my application the command is this:
> >     fgets(in, nINBUF, stdin);
> > and it use the stdin. Probably it is assigned by default with the gdb
> > console.
> > How can I have to do to differentiate the input/output channel to have
all
> > on the serial interface for example?
>
> You need to change the default console.
>
> CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE
>
> It will be using /dev/ttydiag which is being directed to gdb. You need
> to change this to one of your serial ports.
>
>         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
>


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

end of thread, other threads:[~2005-09-17 23:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-17  8:52 [ECOS] shell application Jaws
2005-09-17 16:46 ` Andrew Lunn
2005-09-17 17:50   ` David N. Welton
2005-09-17 18:13     ` Jaws
2005-09-17 23:45       ` Andrew Lunn
2005-09-18  6:32         ` Jaws
2005-09-18 17:59           ` Andrew Lunn
2005-09-18 18:43             ` Jaws

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