lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Xilinx -> Microblaze -> NetIF Question


From: Lachlan Grogan
Subject: RE: [lwip-users] Xilinx -> Microblaze -> NetIF Question
Date: Thu, 25 May 2006 18:52:15 +1000

Hey Sathya,
 
Thanks for your ultimate solution to my problem.  It all works fine now!!.
 
I didn't see this mem_malloc issue comming..  Maybe page 166 of the Xilinx OS & Lib Documentation (oslib_rm.pdf) needs to be updated to reflect this issue.
 
Thanks again.
Regards
Lachlan Grogan.


From: address@hidden [mailto:address@hidden On Behalf Of Sathya Thammanur
Sent: Wednesday, 24 May 2006 12:46 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Xilinx -> Microblaze -> NetIF Question

Hi,
Do you allocate the memory for the defeault_netif? This seems to be the issue.

   default_netif = mem_malloc(sizeof(struct netif));

I think this should fix your problem.

Sathya

On 5/22/06, Lachlan Grogan <address@hidden > wrote:
Hey All,
 
I have encountered an issue, not to sure if it is my poor coding, a limitation of lwip, or one of these memory alignment issues i've been reading about.
 
I have the following example code:
 
void foo_bar()
{
    struct netif * default_netif;
 
    .... Init Code Goes Here
 
    default_netif = netif_add(......)
 
    ... more code goes here.   
}
 
This works fine and my system is up and operational.  However I wish to do the following:
 
 
struct netif * default_netif;
 
void foo_bar()
{ 
    .... Init Code Goes Here
 
    default_netif = netif_add(......)
 
    ... more code goes here.   
}
 
 
This code does not work, netif_add(..) does not return, and crashes my MicroBlaze. 
It is far superior for me to have the pointer to the netif "global" so as other functions can make use of it.
 
Can anyone suggest a solution, or see anything stupid that im doing?
 
Kind Regards
Lachlan Grogan.
 
 

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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