cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
schumerth
Adventurer
Adventurer
471 Views
Registered: ‎06-05-2015

Another undefined reference error, but this time with xemacps

Jump to solution

I have to use Vivado 2015.2 and SDK 2015.2 for my project.

I have created simple block diagram for a zed board and made sure that inside the processor block I have enabled the mac.

When I go to SDK and try to use XEmacPs_BdSetRxWrap as a function I get undefined reference.  I can still open the function declarationby pressing F3.

I have been trying to find a solution this this problem for a couple of days now and have read a couple of forum post about similar problems, but their solution did not work for me.

 

I can only think of two reason my design will not compile. first there is a linker problem and the second reason is the parameter I am passing is causing the error.

 

The code I am using:

 

XEmacPs_BdSetRxWrap(BdRxPtr+RXBD_CNT-1);

 

BdRxPtr, is a XEmacPs_Bd pointer

RXBD is #defined as 16

 

Any help is greatly appreciated.  

0 Kudos
1 Solution

Accepted Solutions
schumerth
Adventurer
Adventurer
402 Views
Registered: ‎06-05-2015

I found the issue.  There was a missing macro.  I have pasted the code below in case anyone has a similar issue in the future.

This seem to be an issue with something under the hood on xilinx part.  I had a conversation with a coworker and he remembered having to dig into some of the files to find this out.

#define SDK_15_2
#ifdef SDK_15_2 // macros missing from new SDK
#define XEmacPs_BdSetRxWrap(BdPtr)                                 \
    (XEmacPs_BdWrite((BdPtr), XEMACPS_BD_ADDR_OFFSET,             \
    XEmacPs_BdRead((BdPtr), XEMACPS_BD_ADDR_OFFSET) |             \
    XEMACPS_RXBUF_WRAP_MASK))
#define XEmacPs_BdSetTxWrap(BdPtr)                                 \
    (XEmacPs_BdWrite((BdPtr), XEMACPS_BD_STAT_OFFSET,             \
    XEmacPs_BdRead((BdPtr), XEMACPS_BD_STAT_OFFSET) |             \
    XEMACPS_TXBUF_WRAP_MASK))
#endif

View solution in original post

0 Kudos
1 Reply
schumerth
Adventurer
Adventurer
403 Views
Registered: ‎06-05-2015

I found the issue.  There was a missing macro.  I have pasted the code below in case anyone has a similar issue in the future.

This seem to be an issue with something under the hood on xilinx part.  I had a conversation with a coworker and he remembered having to dig into some of the files to find this out.

#define SDK_15_2
#ifdef SDK_15_2 // macros missing from new SDK
#define XEmacPs_BdSetRxWrap(BdPtr)                                 \
    (XEmacPs_BdWrite((BdPtr), XEMACPS_BD_ADDR_OFFSET,             \
    XEmacPs_BdRead((BdPtr), XEMACPS_BD_ADDR_OFFSET) |             \
    XEMACPS_RXBUF_WRAP_MASK))
#define XEmacPs_BdSetTxWrap(BdPtr)                                 \
    (XEmacPs_BdWrite((BdPtr), XEMACPS_BD_STAT_OFFSET,             \
    XEmacPs_BdRead((BdPtr), XEMACPS_BD_STAT_OFFSET) |             \
    XEMACPS_TXBUF_WRAP_MASK))
#endif

View solution in original post

0 Kudos