From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128891 invoked by alias); 9 Apr 2015 12:15:37 -0000 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 Received: (qmail 128881 invoked by uid 89); 9 Apr 2015 12:15:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f176.google.com Received: from mail-ig0-f176.google.com (HELO mail-ig0-f176.google.com) (209.85.213.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 09 Apr 2015 12:15:35 +0000 Received: by ignm3 with SMTP id m3so47695464ign.0 for ; Thu, 09 Apr 2015 05:15:33 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.43.59.135 with SMTP id wo7mr38865124icb.79.1428581733307; Thu, 09 Apr 2015 05:15:33 -0700 (PDT) Received: by 10.64.72.234 with HTTP; Thu, 9 Apr 2015 05:15:33 -0700 (PDT) In-Reply-To: <552447CE.7090807@web.de> References: <552447CE.7090807@web.de> Date: Thu, 09 Apr 2015 12:15:00 -0000 Message-ID: From: Jerzy Dyrda To: Dennis S Cc: eCos Discussion Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Subject: Re: [ECOS] How to activate ethernet driver X-SW-Source: 2015-04/txt/msg00002.txt.bz2 Hello Dennis, You have to add your PHY driver to the list in devs/eth/phy/current/cdl/phy_eth_drivers.cdl like that: cdl_option CYGHWR_DEVS_ETH_PHY_LAN8720A { display "SMSC LAN8720A" flavor bool default_value 0 compile -library=libextras.a LAN8720A.c description " Include support for SMSC LAN8720A" } and after that of course choose it. Regarding ETH driver you have to provide such entry in an code of driver : ETH_DRV_SC(stm32_sc, &stm32_priv_data, // Driver specific data "eth0", // Name for this interface stm32_eth_start, stm32_eth_stop, stm32_eth_control, stm32_eth_can_send, stm32_eth_send, stm32_eth_recv, stm32_eth_deliver, stm32_eth_poll, stm32_eth_int_vector); NETDEVTAB_ENTRY(stm32_netdev, "stm32", stm32_eth_init, &stm32_sc); after that init() funtion (in my case stm32_eth_init,) will be called. Best regards, jerzy 2015-04-07 23:10 GMT+02:00 Dennis S : > Good evening, > I have a question concerning the programming of the ethernet in eCos. > > The current state is, that I can use some existent functions for the > MAC of my Embedded System located in /devs/eth. They provide the > possibility to access the hardware via HAL_WRITE(). The init function > is used in the NETDEV_TAB macro. > > Additionally I wrote some drivers for the seperated PHY with the > obligatory "phy_stat" function. When I started debugging I was very > suprised, that either the init function of the mac nor some function > of the PHY driver was used (I set a brakpoint there and nothing > happens). > > So my question is: do I have to activate some other things to get > the ethernet work? What possibilities are there to check the result? > By the way: the plan is to use a third party TCP-stack later. > > Kind regards, > Dennis > > -- > 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