From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23362 invoked by alias); 20 Dec 2009 20:20:19 -0000 Received: (qmail 23350 invoked by uid 22791); 20 Dec 2009 20:20:17 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from fmmailgate03.web.de (HELO fmmailgate03.web.de) (217.72.192.234) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Dec 2009 20:20:11 +0000 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id EED50139E851D; Sun, 20 Dec 2009 21:20:08 +0100 (CET) Received: from [91.8.223.117] (helo=[127.0.0.1]) by smtp07.web.de with asmtp (WEB.DE 4.110 #314) id 1NMSG8-0001yR-00; Sun, 20 Dec 2009 21:20:08 +0100 Message-ID: <4B2E86FA.1090608@web.de> Date: Sun, 20 Dec 2009 20:20:00 -0000 From: Bernhard Gebert User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Sergei Gavrikov CC: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Sender: bernhard_gebert@web.de X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] cyg_io_lookup() allways returns ENOENT X-SW-Source: 2009-12/txt/msg00038.txt.bz2 Hello Sergei, thanks for your fast reply and your information about the general handling. As I am used to the eCos Configtool, I tried it this way. In the "Packages" window, there is a checkbox "Omit hardware packages" which I ignored until now. But, adding the device driver is blocked with the info "Add and remove hardware packages by selecting a new hardware template." By searching a bit, I found http://old.nabble.com/SPI-support-cannot-be-added-for-AT91SAM7X-EK-td21456285.html and added CYGPKG_DEVS_CAN_AT91SAM7 to the structure "target at91sam7xek". But the new package does not occur in the package window on the selected side, and the io_lookup() does still not work. By the way, CYGPKG_IO_SPI and CYGPKG_DEVS_SPI_ARM_AT91 are included and visible in the selected packages window. Is the template "default" my problem? When I select "all", the kernel gets too large for my µC, and all the other variants do not look more useful. Brg, Bernhard Sergei Gavrikov schrieb: > 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