public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jerzy Dyrda <jerzdy@gmail.com>
To: Dennis S <Incubus84@web.de>
Cc: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] How to activate ethernet driver
Date: Thu, 09 Apr 2015 12:15:00 -0000	[thread overview]
Message-ID: <CABmKEG9HwEN_cw_8GyaxK-_JcP35Tzn_60_qfVnMiBGKjYbqRg@mail.gmail.com> (raw)
In-Reply-To: <552447CE.7090807@web.de>

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 <Incubus84@web.de>:
> 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

  reply	other threads:[~2015-04-09 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 21:10 Dennis S
2015-04-09 12:15 ` Jerzy Dyrda [this message]
     [not found]   ` <trinity-4777fcb7-729d-4f01-bb84-58b445200f13-1428584884951@3capp-webde-bs37>
2015-04-09 13:43     ` Jerzy Dyrda
     [not found]       ` <trinity-88db4679-45f1-4bed-85a9-70b78399a50a-1428657096995@3capp-webde-bs01>
2015-04-10 11:26         ` Jerzy Dyrda
2015-04-10 14:30           ` [ECOS] " Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABmKEG9HwEN_cw_8GyaxK-_JcP35Tzn_60_qfVnMiBGKjYbqRg@mail.gmail.com \
    --to=jerzdy@gmail.com \
    --cc=Incubus84@web.de \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).