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 Xilinx PTPv2 usage
  • 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 2 replies
  • Subscribers 328 subscribers
  • Views 435 views
  • Users 0 members are here
Related

Xilinx PTPv2 usage

Former Member
Former Member over 11 years ago

Hi.
I want to use the PTP project from xilinx. http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+IEEE1588+v2+Precision+Time+Protocol+Tech+Tip
After recompiling the kernel I do not know how to integrate or what exactly to do.
Does anybody know, or has anybody implemented the PTPv2 yet?

How can I use the user applications or how can I get them.
The image on the predefined holds an elf file for but no sources.

I need to extend the functionality, so I need the sources themselves.

Thanks in advance.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 11 years ago

    I downloaded the LinuxPTP from git and tried to compile it, but without any success.
    I get one Error :

    sk.c: In function 'hwts_init':
    sk.c:55:30: error: 'HWTSTAMP_TX_ONESTEP_SYNC' undeclared (first use in this function)
    sk.c:55:30: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [sk.o] Error 1

    So I had a look at the source file sk.c at line 55:
    tcfg.tx_type    = one_step ? HWTSTAMP_TX_ONESTEP_SYNC : HWTSTAMP_TX_ON;
    and at the include files:
    #include <errno.h>
    #include <./linux/net_tstamp.h>
    #include <./linux/sockios.h>
    #include <linux/ethtool.h>
    #include <net/if.h>
    #include <netinet/in.h>
    #include <string.h>
    #include <sys/ioctl.h>
    #include <unistd.h>
    #include <ifaddrs.h>
    #include <stdlib.h>
    #include <poll.h>
    I couldn't find net_tstamp.h neither ethtool in my XilinxLinux sources

    The xilinx_emacps.c File, which is necessary to modify for hw timestamping  does contain HWTSTAMP_TX_ONESTEP_SYNC


    There is only the enable of HWTSAMP... starting at line 2600:
    #ifdef CONFIG_XILINX_PS_EMAC_HWTSTAMP
    static int xemacps_hwtstamp_ioctl(struct net_device *netdev,
    ttttstruct ifreq *ifr, int cmd)
    {
    tstruct hwtstamp_config config;
    tstruct net_local *lp;
    tu32 regval;

    tlp = netdev_priv(netdev);

    tif (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
    ttreturn -EFAULT;

    t/* reserved for future extensions */
    tif (config.flags)
    ttreturn -EINVAL;

    tif ((config.tx_type != HWTSTAMP_TX_OFF) &&
    tt(config.tx_type != HWTSTAMP_TX_ON))
    ttreturn -ERANGE;


    So, how can I enable HWTStamp for LinuxPTP project? Which sources do I have to include instead?
    Thanks in advance

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

    I downloaded the LinuxPTP from git and tried to compile it, but without any success.
    I get one Error :

    sk.c: In function 'hwts_init':
    sk.c:55:30: error: 'HWTSTAMP_TX_ONESTEP_SYNC' undeclared (first use in this function)
    sk.c:55:30: note: each undeclared identifier is reported only once for each function it appears in
    make: *** [sk.o] Error 1

    So I had a look at the source file sk.c at line 55:
    tcfg.tx_type    = one_step ? HWTSTAMP_TX_ONESTEP_SYNC : HWTSTAMP_TX_ON;
    and at the include files:
    #include <errno.h>
    #include <./linux/net_tstamp.h>
    #include <./linux/sockios.h>
    #include <linux/ethtool.h>
    #include <net/if.h>
    #include <netinet/in.h>
    #include <string.h>
    #include <sys/ioctl.h>
    #include <unistd.h>
    #include <ifaddrs.h>
    #include <stdlib.h>
    #include <poll.h>
    I couldn't find net_tstamp.h neither ethtool in my XilinxLinux sources

    The xilinx_emacps.c File, which is necessary to modify for hw timestamping  does contain HWTSTAMP_TX_ONESTEP_SYNC


    There is only the enable of HWTSAMP... starting at line 2600:
    #ifdef CONFIG_XILINX_PS_EMAC_HWTSTAMP
    static int xemacps_hwtstamp_ioctl(struct net_device *netdev,
    ttttstruct ifreq *ifr, int cmd)
    {
    tstruct hwtstamp_config config;
    tstruct net_local *lp;
    tu32 regval;

    tlp = netdev_priv(netdev);

    tif (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
    ttreturn -EFAULT;

    t/* reserved for future extensions */
    tif (config.flags)
    ttreturn -EINVAL;

    tif ((config.tx_type != HWTSTAMP_TX_OFF) &&
    tt(config.tx_type != HWTSTAMP_TX_ON))
    ttreturn -ERANGE;


    So, how can I enable HWTStamp for LinuxPTP project? Which sources do I have to include instead?
    Thanks in advance

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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