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: cyg_io_lookup() allways returns ENOENT


On Sun, Dec 20, 2009 at 04:30:55PM +0100, Bernhard Gebert wrote:
> Hi,
> 
> running my AT91SAM7X256-EK with the eCos configuration from template
> "default", I would like to acess the CAN device driver.  As I am not
> experienced with drivers, I simply called
> cyg_io_lookup("/dev/can0",&handle), but I got the ENOENT error. The

Hi Bernhard,

Default template has not support for CAN devs. You must add two extra
packages: CYGPKG_IO_CAN (generic `can' pkg), CYGPKG_DEVS_CAN_AT91SAM7
(`can' pkg for your target)

It seems for me that the minimal steps to configure a build with CAN
support for your target are

  ecosconfig new at91sam7xek
  ecosconfig add CYGPKG_IO_CAN CYGPKG_DEVS_CAN_AT91SAM7

or using the package's aliases

  ecosconfig new at91sam7xek
  ecosconfig add can devs_can_at91sam7

I believe in that what the same things it's possible to fulfil using
eCos GUI configure tool (`configtool').

> same result for /dev/tty0, /sev/ser0, /dev/spi0, and so on.  The

The same is for other eCos devices, you need either to add or allow
the generic i/o package/driver for the device(s) and possible to add
the target's specific package (if target has a support for such a kind
of the devices).

> method of searching for a directory-like string sounds like in real
> hich level system with file handling; but my small AT91 runs
> everything from ROM without a file system. Is this the problem?

Those I/O devices do not claim a FS support.

> One more silly question: I did not find a string like "/dev/..." in
> the ecos tree, but anyone (the low-level device-driver
> can_at91sam7.c?) has to register at the eCos devTable with this
> name?!?

The eCos documentation is a clue
http://ecos.sourceware.org/docs-latest/
http://ecos.sourceware.org/docs-latest/ref/io.html

HIH

Sergei

> Thanks in advance, Bernhard

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