Naive newbie questions!

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Naive newbie questions!

Peter Seebach
Hi!  I got curious about eCos and decided to do a couple of small projects
in it.  My target system is a TAMS 3011.

My first question, which should give you some clue of how little I know of
what's going on, is this:  How do I determine which version of eCos is in
a source repository?  Everything is named "current".  Presumably it was
current when it was shipped, but is there a version string or number anywhere?
If so, where would I find it?

My second question is a little more elaborate.  In a fit of insanity, I
decided that what I really need out of an embedded system is the ability
to play Zork.  So, I've ported frotz to eCos.  This means copying the guts
of the Berkeley curses and termcap libraries over, hard-coding in a termcap
entry, and running things that way.

Surprisingly, this works!

Only, it doesn't quite.  Once frotz is booted, every other character is
dropped.  Worse, it doesn't actually get cbreak mode; regular line-mode
processing is still in effect, such that I can edit a line using backspace,
etcetera, and when I'm done, the edited line shows up all at once.

To clarify, the "every other character is dropped" thing happens before any
input processing.  So, if I type "hello\n", I don't get back the line "hlo";
I get nothing, because the "\n" was one of the characters dropped.  (The hlo
echoes, though.)  If I type "hheelllloo\n\n", then, after the second \n is
sent, the whole line shows up.  If I type "h e l l o \n ", same thing.

It doesn't appear that attempts to tweak terminal mode are at issue; this
seems to happen regardless.

Any likely first things to look at?  I guess the first question is, are
people successfully doing reads (and ideally raw reads with no line buffering)
on this system?

-s

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

Reply | Threaded
Open this post in threaded view
|

Re: Naive newbie questions!

Gary Thomas
On Thu, 2005-12-22 at 14:45 -0600, Peter Seebach wrote:
> Hi!  I got curious about eCos and decided to do a couple of small projects
> in it.  My target system is a TAMS 3011.
>
> My first question, which should give you some clue of how little I know of
> what's going on, is this:  How do I determine which version of eCos is in
> a source repository?  Everything is named "current".  Presumably it was
> current when it was shipped, but is there a version string or number anywhere?
> If so, where would I find it?

There's no version number or even string - we rely on CVS versioning and
the dates on the files.

>
> My second question is a little more elaborate.  In a fit of insanity, I
> decided that what I really need out of an embedded system is the ability
> to play Zork.  So, I've ported frotz to eCos.  This means copying the guts
> of the Berkeley curses and termcap libraries over, hard-coding in a termcap
> entry, and running things that way.
>
> Surprisingly, this works!
>
> Only, it doesn't quite.  Once frotz is booted, every other character is
> dropped.  Worse, it doesn't actually get cbreak mode; regular line-mode
> processing is still in effect, such that I can edit a line using backspace,
> etcetera, and when I'm done, the edited line shows up all at once.
>
> To clarify, the "every other character is dropped" thing happens before any
> input processing.  So, if I type "hello\n", I don't get back the line "hlo";
> I get nothing, because the "\n" was one of the characters dropped.  (The hlo
> echoes, though.)  If I type "hheelllloo\n\n", then, after the second \n is
> sent, the whole line shows up.  If I type "h e l l o \n ", same thing.
>
> It doesn't appear that attempts to tweak terminal mode are at issue; this
> seems to happen regardless.
>
> Any likely first things to look at?  I guess the first question is, are
> people successfully doing reads (and ideally raw reads with no line buffering)
> on this system?

Yes, absolutely :-)

What driver did you use for the serial port?
How did you configure the system?

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

Reply | Threaded
Open this post in threaded view
|

Re: Naive newbie questions!

Peter Seebach
In message <1135331744.11414.153.camel@hermes>, Gary Thomas writes:
>There's no version number or even string - we rely on CVS versioning and
>the dates on the files.

Oh!  Okay, that at least explains why I can't see one.  So what's the stuff
on the web site about "1.3.1" and "2.0" refer to?

>What driver did you use for the serial port?

Whatever the default was.

>How did you configure the system?

ecosconfig new moab405gpr kernel

(or whatever the name is for the TAMS.)

Output's great; I get a reverse-video "West of House" and the intro text is
fine, it's just input being weird.  Obviously, the next step is a great deal
of playing around with test programs to see what's going on.  My guess is that
some apparently rational ioctl is putting the system in an unexpected state,
and skimming the code, I'm very distrustful of the VMIN handling.

-s

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

Reply | Threaded
Open this post in threaded view
|

Re: Naive newbie questions!

Gary Thomas
On Fri, 2005-12-23 at 12:50 -0600, Peter Seebach wrote:
> In message <1135331744.11414.153.camel@hermes>, Gary Thomas writes:
> >There's no version number or even string - we rely on CVS versioning and
> >the dates on the files.
>
> Oh!  Okay, that at least explains why I can't see one.  So what's the stuff
> on the web site about "1.3.1" and "2.0" refer to?

>From time to time (rather rarely, in fact), "versions" have been
captured from "current".  1.3.1 was customer driven while eCos was
still a project funded by Red Hat, 2.0 came just after our "split"
with them.  We're considering a 3.0 sometime [soon?], after we get
the FSF licensing issues resolved (there has been discussion about
this on this list in the past months)

>
> >What driver did you use for the serial port?
>
> Whatever the default was.

Which would be /dev/ttydiag which is a somewhat crude interface to
the diagnostic serial drivers.

>
> >How did you configure the system?
>
> ecosconfig new moab405gpr kernel
>
> (or whatever the name is for the TAMS.)
>
> Output's great; I get a reverse-video "West of House" and the intro text is
> fine, it's just input being weird.  Obviously, the next step is a great deal
> of playing around with test programs to see what's going on.  My guess is that
> some apparently rational ioctl is putting the system in an unexpected state,
> and skimming the code, I'm very distrustful of the VMIN handling.
I think you should try using the interrupt driven serial
interface, which will require some additional configuration.

I just tested this on a MOAB board; here's how I configured
the system:

  % ecosconfig new moab net
  % ecosconfig import moab_serial_config.ecm
  % ecosconfig tree

Try this and see if it helps.

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

moab_serial_config.ecm (421 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Naive newbie questions!

Peter Seebach
In message <1135370475.11414.175.camel@hermes>, Gary Thomas writes:
>I think you should try using the interrupt driven serial
>interface, which will require some additional configuration.

>I just tested this on a MOAB board; here's how I configured
>the system:

>  % ecosconfig new moab net
>  % ecosconfig import moab_serial_config.ecm
>  % ecosconfig tree

Excellent!  Thanks much, and I'll have a go at this later tonight.

-s

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