element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Ethernet driver (Bare-Metal Application)
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 34 replies
  • Subscribers 337 subscribers
  • Views 4584 views
  • Users 0 members are here
Related

Ethernet driver (Bare-Metal Application)

Former Member
Former Member over 11 years ago

Hi,

I'm starting to work with the Zedboard and I'm very lost. I want to establish an Ethernet connection between the board and a PC, running in the Zedboard a bare-metal application.

I've tried to make work the example of the Xilinx driver emacps (which don't seems very simple to me...), but I don't see any result. I'm running the example on the Zedboard and Wireshark in the PC. As long as I know, I should receive some frames from the board, but I don't see anything (after power up the board I see a lot of frames, but they aren't sent from mi application).

Maybe I'm wrong about what the example shoud do. I just want to learn the simplest way to send and receive frames and see it works...

Any help?

Thank you (and sorry for my English...).

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 10 years ago +1
    Hey sysseon, you missunderstood the example. The example does not send anything to the PC, it makes a selftest useing the loopback function of the PHY. I got Ethernet to work with PC, so if someone needs…
Parents
  • Former Member
    0 Former Member over 10 years ago

    Hey sysseon,
    you missunderstood the example. The example does not send anything to the PC, it makes a selftest useing the loopback function of the PHY.
    I got Ethernet to work with PC, so if someone needs an example, just send me a personal message (like that I get an email notification)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 10 years ago

    Hey sysseon,
    you missunderstood the example. The example does not send anything to the PC, it makes a selftest useing the loopback function of the PHY.
    I got Ethernet to work with PC, so if someone needs an example, just send me a personal message (like that I get an email notification)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Yaro,

    I would very much like to see that example. I have a custom design running on the Pl side of Zedboard. I would like to send LTE baseband data from the Host via Ethernet. This example will help with that past of the code.

    Thanks

    JT

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Hello JT,

    you can download the design here:
    https://dl.dropboxusercontent.com/u/"replace with no bot number"/ethernet.7z

    No bot number is 15987625

    I use Zedboard revision C, but it should work with d, too.

    The program sends a frame (from PS) over gigabit Ethernet and then waits for one. As soon as it receives a frame, it is printed on the standard output.
    You can test it by receiving the frame with wiresharc. I have written a test program to send something to the Zedboard, so if you need that, I can give that to you, too.

    The main difference to the example project is that the Phy is no longer in loopback mode.
    Makeing the region of the BD-list uncacheable is verry important. If you do not know how that is done, read this:
    http://www.silica.com/fileadmin/02_Products/Productdetails/Xilinx/Zynq_MMU_caches_control_ver1.0.pdf

    The program is not well documented, so if you do not understand something, feel free to ask.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Hi,

    thank you for sharing the project with us. If you could also share the program to send something to the zedboard with us this would be perfect!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Hello yaro123,

    thank you for sharing your project with us. It would be perfect if you could also share the test program for sending data to the Zedboard too.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Hello  Harsesis,

    I do not have a small workong programm that sends just one message at the moment.
    But my test program was basically taken from here:
    http://www.winpcap.org/docs/docs_412/html/group__wpcap__tut8.html

    If you want to use raw Ethernet with Windows, just install winpcap and read the tutorial (it's not difficult).
    For debugging reasons I also recommend you to use wireshark https://www.wireshark.org/
    It's a nice and verry easy to use tool for network debugging (by the way, it uses winpcap, too)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Hi yaro123,

    thank you for the hints, I already used wireshark for debugging, but I had problems generating the correct packages. I will try again with the sources you gave me. Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    For setting up the header you can use this function:

    [code]
    #define MAC_ADDR_SIZE 6

    void setFrameHeader(uint8_t *frame, uint8_t *sourceAddr, uint8_t *destAddr, uint16_t etherType)
    {
    tint i;

    t/* Destination address */
    tfor (i = 0; i < MAC_ADDR_SIZE; i++) {
    tt*frame++ = *destAddr++;
    t}

    t/* Source address */
    tfor (i = 0; i < MAC_ADDR_SIZE; i++) {
    tt*frame++ = *sourceAddr++;
    t}

    t*frame++ = (etherType & 0xff00) >> 8;
    t*frame++ = etherType & 0x00ff;
    }


    [code]

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    hey can u please give me that example my email id is there below..
    it would be of great help to me

    shivendraj8@gmail.com

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Dear Yaroslav, 

    I would appreciate it if you send me your Zedboard ethernet project  as I cant access dropbox where I am

    cheerful_dirge@hotmail.com

    Thanks Maged

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Hey yaro,

    You said you got ethernet to work with your pc.
    Will you please be kind to share it with me.

    Regards,
    Manthan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube