lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Xilinx PowerPC receive udp messages


From: Peter Kampmann
Subject: Re: [lwip-users] Xilinx PowerPC receive udp messages
Date: Fri, 25 Aug 2006 00:26:42 -0700 (PDT)

Thanks for your replies.

Perhaps there is a misunderstanding, all the lwip source files have the
extern C Wrapping. 
I tried the example code from Sathya and all worked fine. Then I use the
same project and add another
Application to it, then switched the Compiler to g++ and started to develop
the c++ code.
When coming to the point where I have to register the Interrupt using this
code fragment from the source code from Sathya's example:

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

I get the error is: undefined reference to `XEmac_IntrHandlerFifo' 

After that, I tried some experiments with declaring the example code as
extern C. I hoped then I could call this within the C++ code, but that gives
the same error. 

Regards,
Peter


Sathya Thammanur wrote:
> 
> Hi Peter,
> Matthew is right. Check if your ethernet interrupts are connected
> correctly
> and enabled accordingly. All the drivers code from EDK are wrapped with
> extern C, so this shouldnt be an issue.
> 
> Sathya
> 
> 
> On 8/23/06, Matthew Yingling <address@hidden> wrote:
>>
>> Is your hardware connected properly?
>>
>> In order for the EDK to properly detect the use of interrupts for
>> Ethernet,
>> you need to connect your Ethernet interrupt output to an interrupt
>> controller or directly to your processor.  Otherwise it won't even try to
>> link the interrupt code for the EMAC.
>>
>> Matthew Yingling
>>
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden Behalf Of
>> Peter Kampmann
>> Sent: Wednesday, August 23, 2006 7:28 AM
>> To: address@hidden
>> Subject: Re: [lwip-users] Xilinx PowerPC receive udp messages
>>
>>
>>
>>
>> Pedro Alves-6 wrote:
>> >
>> > 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?
>> >
>>
>> I wrapped the file that includes the above call XIntc_RegisterHandler(..)
>> but that did not help.
>> All files in lwip and the xilinx emac seem to have the
>>
>> #ifdef __cplusplus
>> extern "C" { ...
>>
>> around their headers.
>>
>>
>> Pedro Alves-6 wrote:
>> >
>> > 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.
>> >
>>
>> The function is defined, when I use Ctrl+clicking onto
>> XEmac_IntrHandlerFifo
>> the Platform Studio SDK points me to the function, which is located in
>> xemac.c.
>> But the linker does not find it ...
>>
>> Regards,
>> Peter
>>
>>
>> Pedro Alves-6 wrote:
>> >
>> > Cheers,
>> > Pedro Alves
>> >
>> >
>> > _______________________________________________
>> > lwip-users mailing list
>> > address@hidden
>> > http://lists.nongnu.org/mailman/listinfo/lwip-users
>> >
>> >
>> >
>> --
>> View this message in context:
>>
>> http://www.nabble.com/Xilinx-PowerPC-receive-udp-messages-tf2138912.html#a59
>> 42607
>> Sent from the lwip-users forum at Nabble.com.
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 

-- 
View this message in context: 
http://www.nabble.com/Xilinx-PowerPC-receive-udp-messages-tf2138912.html#a5978703
Sent from the lwip-users forum at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]