This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing flash memory


On Tue, Jan 24, 2006 at 06:02:14AM -0600, Peter Seebach wrote:
> In message <20060124102206.GK8395@lunn.ch>, Andrew Lunn writes:
> >I've never used stdint.h in eCos code. I generally stick to the eCos
> >equivelent: cyg_uint32. 
> 
> Right.  But if I'm porting a bunch of code that uses the standard types, the
> most convenient thing would be to use the existing definitions.

Sure. And that is the power of open source. If you want something and
it is missing, add it. 

> Even with the network stack, I still don't seem to get that.  But I guess my
> real question is:  If I don't happen to already know it's part of the network
> stack, how am I supposed to go from "it's in this header" to "here is the
> package I add to get it"?

The filesystem layout is generally the same as the package
layout. Unformtunetely, it does not work for this example: for example
in packages/net/bsd_tcpip/current/include/machine/types.h. Work your
way up the path. In this case bsd_tcpip is the 'package'. However it
is not called that.

$ ecosconfig list | grep -i BSD
Package CYGPKG_NET_FREEBSD_STACK (FreeBSD Stack):
 aliases: freebsd_net
Package CYGPKG_NET_OPENBSD_STACK (OpenBSD Stack):
 aliases: openbsd_net

It is the OpenBSD stack, so the package is freebsd_net. However, we
don't recommend you just add freebsd_net. Instead use the net
template.

The other way is look at the .cdl file for the package. eg

cdl_package CYGPKG_NET_FREEBSD_STACK {
    display       "FreeBSD networking stack"
    parent        CYGPKG_NET
    doc           ref/tcpip-freebsd.html

> >My guess is you don't have CYGPKG_LIBC_STDIO_FILEIO enabled. 
> 
> Okay.  So, uhm.  Will "ecosconfig list" hint at this?

No. This is a fine grain configuration problem, not a big chunk
configuration problem. 

> Can this feature be added from ecosconfig, or do I have to go edit the
> ecos.ecc file manually?

I think you need to add the package fileio. However there could be
other dependancies i cannot see from just this little section of cdl.
So add fileio and then take another look the ecos.ecc file and see
what it says. It is an iterative process.

> >> 3.  I want termios (tcsetattr, struct termios).  Where do I look?  Nothing
> >> in the documentation says anything but which features are implemented, and
> >> which aren't.
> 
> >It is in io_serial. It will be disables by default so you need to
> >enable it: CYGPKG_IO_SERIAL_TERMIOS. You also need to configure which
> >serial port is is to be used on.
> 
> Okay.
> 
> So, the impression I'm getting is that a lot of these things must be done
> by manually editing ecos.ecc, and that the reason I can't find them in
> ecosconfig's list of packages is that ecosconfig is just a starting point,
> and many configuration options can't be set by it; is that right?

Correct. It says this in the documentation. Look at the end of:

http://ecos.sourceware.org/docs-latest/user-guide/using-ecosconfig-on-linux.html

> Okay, one of the things I was mistaken about was that I'd previously gotten
> the impression that the configtool was a pure GUI wrapper; it didn't offer
> anything you couldn't do from ecosconfig.  I get the impression now that
> ecosconfig is NOT able to do everything, so I need to use configtool for
> some features.

That is not fully correct. the configtool is a replacement for
ecosconfig and a text editor. I prefer to use a text editor where
others prefer a GUI tool. There are lots of CDL options in a typical
ecos.ecc file and i find emacs's search commands very useful and fast
to use as opposed to scrolling around in a GUI.

> Hmm.  That leads me to the idea of doing some documentation work;
> the question is, is the apparent lack of documentation here a design
> decision, or just that no one's had the time or motivation to do it?
> I think that adding "this feature depends on X, Y, and Z" to
> sections in the manual would help immensely, and make life much
> easier on prospective newbie developers.

I guess you are missing the importance of CDL.  To some extend this
information is already available. It is described by the different CDL
files. You just need to learn to read the files. Rather than
documentation, what might be more usefull is a tool which can extract
the depedancy information and show it in a more eCos newbie readable
way. Documentation is hard to maintain, where as CDL is definitive.

        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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]