t-crest / patmos

Patmos is a time-predictable VLIW processor, and the processor for the T-CREST project
http://patmos.compute.dtu.dk
BSD 2-Clause "Simplified" License
135 stars 72 forks source link

Build Errors ptplib_demo #100

Closed epsilon-0311 closed 3 years ago

epsilon-0311 commented 3 years ago

Hi all,

I wanted to test the ptplib_demo and I got a set of compilation errors. I will work on the fix

ptplib_demo.c:93:117: error: too many arguments to function call, expected 7, have 8
                        ptpv2_issue_msg(thisPtpPortInfo, tx_addr, rx_addr, PTP_BROADCAST_MAC, PTP_MULTICAST_IP, seqId, PTP_SYNC_MSGTYPE, syncInterval);
                        ~~~~~~~~~~~~~~~                                                                                                  ^~~~~~~~~~~~
/opt/t-crest/patmos/c/ethlib/ptp1588.h:187:1: note: 'ptpv2_issue_msg' declared here
int ptpv2_issue_msg(PTPPortInfo ptpPortInfo, unsigned tx_addr, unsigned rx_addr, unsigned char destination_mac[6], unsigned char destination_ip[4], unsigned seqId, unsigned msgType);
^
ptplib_demo.c:95:119: error: too many arguments to function call, expected 7, have 8
                        ptpv2_issue_msg(thisPtpPortInfo, tx_addr, rx_addr, PTP_BROADCAST_MAC, PTP_MULTICAST_IP, seqId, PTP_FOLLOW_MSGTYPE, syncInterval);
                        ~~~~~~~~~~~~~~~                                                                                                    ^~~~~~~~~~~~
/opt/t-crest/patmos/c/ethlib/ptp1588.h:187:1: note: 'ptpv2_issue_msg' declared here
int ptpv2_issue_msg(PTPPortInfo ptpPortInfo, unsigned tx_addr, unsigned rx_addr, unsigned char destination_mac[6], unsigned char destination_ip[4], unsigned seqId, unsigned msgType);
^
ptplib_demo.c:101:141: error: too many arguments to function call, expected 7, have 8
                                        ptpv2_issue_msg(thisPtpPortInfo, tx_addr, rx_addr, PTP_BROADCAST_MAC, lastSlaveInfo.ip, rxPTPMsg.head.sequenceId, PTP_DLYRPLY_MSGTYPE, syncInterval);
                                        ~~~~~~~~~~~~~~~                                                                                                                        ^~~~~~~~~~~~
/opt/t-crest/patmos/c/ethlib/ptp1588.h:187:1: note: 'ptpv2_issue_msg' declared here
int ptpv2_issue_msg(PTPPortInfo ptpPortInfo, unsigned tx_addr, unsigned rx_addr, unsigned char destination_mac[6], unsigned char destination_ip[4], unsigned seqId, unsigned msgType);
^
ptplib_demo.c:127:141: error: too many arguments to function call, expected 7, have 8
                                        ptpv2_issue_msg(thisPtpPortInfo, tx_addr, rx_addr, PTP_BROADCAST_MAC, lastMasterInfo.ip, rxPTPMsg.head.sequenceId, PTP_DLYREQ_MSGTYPE, ptpTimeRecord.syncInterval);
                                        ~~~~~~~~~~~~~~~                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/t-crest/patmos/c/ethlib/ptp1588.h:187:1: note: 'ptpv2_issue_msg' declared here
int ptpv2_issue_msg(PTPPortInfo ptpPortInfo, unsigned tx_addr, unsigned rx_addr, unsigned char destination_mac[6], unsigned char destination_ip[4], unsigned seqId, unsigned msgType);
^
ptplib_demo.c:133:140: error: too many arguments to function call, expected 7, have 8
                                ptpv2_issue_msg(thisPtpPortInfo, tx_addr, rx_addr, PTP_BROADCAST_MAC, lastMasterInfo.ip, rxPTPMsg.head.sequenceId, PTP_DLYREQ_MSGTYPE, ptpTimeRecord.syncInterval);
                                ~~~~~~~~~~~~~~~                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/t-crest/patmos/c/ethlib/ptp1588.h:187:1: note: 'ptpv2_issue_msg' declared here
int ptpv2_issue_msg(PTPPortInfo ptpPortInfo, unsigned tx_addr, unsigned rx_addr, unsigned char destination_mac[6], unsigned char destination_ip[4], unsigned seqId, unsigned msgType);
^
ptplib_demo.c:181:109: error: too few arguments to function call, expected 6, have 4
                thisPtpPortInfo = ptpv2_intialize_local_port(PATMOS_IO_ETH, my_mac, (unsigned char[4]){192, 168, 2, 50}, 1);
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~                                                              ^
/opt/t-crest/patmos/c/ethlib/ptp1588.h:181:1: note: 'ptpv2_intialize_local_port' declared here
PTPPortInfo ptpv2_intialize_local_port(unsigned int eth_base, int portRole, unsigned char mac[6], unsigned char ip[4], unsigned short portId, int syncPeriod);
^
ptplib_demo.c:198:124: error: too few arguments to function call, expected 6, have 4
                thisPtpPortInfo = ptpv2_intialize_local_port(PATMOS_IO_ETH, my_mac, (unsigned char[4]){192, 168, 2, rand_addr}, rand_addr);
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                             ^