Peter Kampmann wrote:
Hi Sathya,

thanks a lot, that example quite helped me.
But as I want to use the lwip in C++ I get an error at

XIntc_RegisterHandler(XPAR_OPB_INTC_0_BASEADDR,
                       XPAR_OPB_INTC_0_ETHERNET_MAC_IP2INTC_IRPT_INTR,
                       (XInterruptHandler)XEmac_IntrHandlerFifo,
                        xemacif_ptr->instance_ptr);

the error is: undefined reference to `XEmac_IntrHandlerFifo'

Even if I tell the C++ Compiler to handle this code as c code via #ifdef __cplusplus
extern "C" { ...

I get this error. What am I doing wrong?


A few ideas:

1)

You wrapped this? :
> XIntc_RegisterHandler(XPAR_OPB_INTC_0_BASEADDR,
>                        XPAR_OPB_INTC_0_ETHERNET_MAC_IP2INTC_IRPT_INTR,
>                        (XInterruptHandler)XEmac_IntrHandlerFifo,
>                         xemacif_ptr->instance_ptr);

or the declaration of XEmac_IntrHandlerFifo?

You need to wrap XEmac_IntrHandlerFifo.

No idea what the function looks like, but probably like this?
extern "C" void XEmac_IntrHandlerFifo(void*);

2)
Is the function really defined?
Try checking with the map file, if you have one,
or with something equivalent of nm or objdump.

Cheers,
Pedro Alves


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to