emacps_v3_0: Removed IAR compilation errors in examples.
This patch removes IAR compilation errors in emacps examples. Signed-off-by: P L Sai Krishna <lakshmis@xilinx.com>
This commit is contained in:
parent
c5ad94e476
commit
eda5fe3e10
3 changed files with 32 additions and 6 deletions
|
@ -92,8 +92,14 @@
|
|||
* Define an aligned data type for an ethernet frame. This declaration is
|
||||
* specific to the GNU compiler
|
||||
*/
|
||||
#ifdef __ICCARM__
|
||||
#pragma data_alignment = 64
|
||||
typedef char EthernetFrame[XEMACPS_MAX_VLAN_FRAME_SIZE];
|
||||
#pragma data_alignment = 4
|
||||
#else
|
||||
typedef char EthernetFrame[XEMACPS_MAX_VLAN_FRAME_SIZE]
|
||||
__attribute__ ((aligned(64)));
|
||||
#endif
|
||||
|
||||
/************************** Function Prototypes *****************************/
|
||||
|
||||
|
|
|
@ -177,9 +177,16 @@ u32 TxFrameLength;
|
|||
static XScuGic IntcInstance;
|
||||
#endif
|
||||
|
||||
#ifdef __ICCARM__
|
||||
#pragma data_alignment = 64
|
||||
XEmacPs_Bd BdTxTerminate;
|
||||
XEmacPs_Bd BdRxTerminate;
|
||||
#pragma data_alignment = 4
|
||||
#else
|
||||
XEmacPs_Bd BdTxTerminate __attribute__ ((aligned(64)));
|
||||
|
||||
XEmacPs_Bd BdRxTerminate __attribute__ ((aligned(64)));
|
||||
#endif
|
||||
|
||||
u32 GemVersion;
|
||||
|
||||
|
|
|
@ -141,15 +141,28 @@ u8 UnicastMAC[] = {0x00, 0x0A, 0x35, 0x01, 0x02, 0x09};
|
|||
/*
|
||||
* Aligned memory segments to be used for Rx buffer descriptors
|
||||
*/
|
||||
#ifdef __ICCARM__
|
||||
#pragma data_alignment = XEMACPS_RX_BUF_ALIGNMENT
|
||||
u8 RxBuf[XEMACPS_IEEE1588_NO_OF_RX_DESCS][XEMACPS_PACKET_LEN + 2];
|
||||
#pragma data_alignment = 4
|
||||
#else
|
||||
u8 RxBuf[XEMACPS_IEEE1588_NO_OF_RX_DESCS][XEMACPS_PACKET_LEN + 2]
|
||||
__attribute__ ((aligned(XEMACPS_RX_BUF_ALIGNMENT)));
|
||||
#endif
|
||||
|
||||
#ifdef PEEP
|
||||
#ifdef __ICCARM__
|
||||
#pragma data_alignment = XEMACPS_BD_ALIGNMENT
|
||||
u8 TxRingPntrBase[TXBD_SPACE_BYTES];
|
||||
u8 RxRingPntrBase[RXBD_SPACE_BYTES];
|
||||
#pragma data_alignment = 4
|
||||
#else
|
||||
u8 TxRingPntrBase[TXBD_SPACE_BYTES]
|
||||
__attribute__ ((aligned(XEMACPS_BD_ALIGNMENT)));
|
||||
u8 RxRingPntrBase[RXBD_SPACE_BYTES]
|
||||
__attribute__ ((aligned(XEMACPS_BD_ALIGNMENT)));
|
||||
#endif
|
||||
#endif
|
||||
#ifdef IEEE1588_MASTER
|
||||
u8 SrcAddr[6] = {0x00,0x0A,0x35,0x01,0x02,0x03};
|
||||
u8 DestnAddr[6] = {0x01,0x80,0xC2,0x00,0x00,0x0E};
|
||||
|
@ -291,15 +304,15 @@ int main(void)
|
|||
*/
|
||||
Status = XEmacPs_SetHandler (EmacPsInstancePtr,
|
||||
XEMACPS_HANDLER_DMARECV,
|
||||
XEmacPs_PtpRxInterruptHandler,
|
||||
(void *)XEmacPs_PtpRxInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
Status |= XEmacPs_SetHandler (EmacPsInstancePtr,
|
||||
XEMACPS_HANDLER_DMASEND,
|
||||
XEmacPs_PtpTxInterruptHandler,
|
||||
(void *)XEmacPs_PtpTxInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
Status |= XEmacPs_SetHandler (EmacPsInstancePtr,
|
||||
XEMACPS_HANDLER_ERROR,
|
||||
XEmacPs_PtpErrorInterruptHandler,
|
||||
(void *)XEmacPs_PtpErrorInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
|
@ -1839,15 +1852,15 @@ void XEmacPs_PtpErrorInterruptHandler (XEmacPs_Ieee1588 *InstancePtr,
|
|||
*/
|
||||
Status = XEmacPs_SetHandler (InstancePtr->EmacPsInstance,
|
||||
XEMACPS_HANDLER_DMARECV,
|
||||
XEmacPs_PtpRxInterruptHandler,
|
||||
(void *)XEmacPs_PtpRxInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
Status |= XEmacPs_SetHandler (InstancePtr->EmacPsInstance,
|
||||
XEMACPS_HANDLER_DMASEND,
|
||||
XEmacPs_PtpTxInterruptHandler,
|
||||
(void *)XEmacPs_PtpTxInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
Status |= XEmacPs_SetHandler (InstancePtr->EmacPsInstance,
|
||||
XEMACPS_HANDLER_ERROR,
|
||||
XEmacPs_PtpErrorInterruptHandler,
|
||||
(void *)XEmacPs_PtpErrorInterruptHandler,
|
||||
&IEEE1588ProtoHandler);
|
||||
if (Status != XST_SUCCESS) {
|
||||
#ifdef DEBUG_XEMACPS_LEVEL1
|
||||
|
|
Loading…
Add table
Reference in a new issue