UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor mmarrone-mac
Visitor
634 Views
Registered: ‎07-03-2018

lwIP: Where am I supposed to define sys_now()?

Jump to solution

When NO_SYS=1 and NO_SYS_NO_TIMERS=0, lwIP expects a function sys_now() to be defined.  The implementation of this function is pretty trivial, but I can't figure out where the SDK wants me to put it.

 

If I implement it inside my main project, the lwIP build doesn't find the definition.  Adding a new file at the top level of the BSP project doesn't work, either.

 

What does work is editing BSP/libsrc/lwip202_v1_1/src/contrib/ports/xilinx/sys_arch_raw.c.  But this seems hackish.  In particular, this modification won't survive a "Regenerate BSP Sources" action.

 

What's the intended way for me to do this sort of customization?

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
692 Views
Registered: ‎09-12-2007

Re: lwIP: Where am I supposed to define sys_now()?

Jump to solution

The way to do this would be to use your "Hackish" way to do this. The LwIP port delivered with SDK is the LwIP with a port (or wrapper) to work on the Xilinx devices. It really isnt setup to be hacked like this. 

 

Yo ucan make a local copy of the lwip, make the mods and add this to the repo used in SDK. Then when you create the BSP, it will use this version. This is covered in the wiki below: 

http://www.wiki.xilinx.com/HSI+debugging+and+optimization+techniques

 

See the Adding custom BSP, Library, Drivers, or SW Apps to SDK section

1 Reply
Moderator
Moderator
693 Views
Registered: ‎09-12-2007

Re: lwIP: Where am I supposed to define sys_now()?

Jump to solution

The way to do this would be to use your "Hackish" way to do this. The LwIP port delivered with SDK is the LwIP with a port (or wrapper) to work on the Xilinx devices. It really isnt setup to be hacked like this. 

 

Yo ucan make a local copy of the lwip, make the mods and add this to the repo used in SDK. Then when you create the BSP, it will use this version. This is covered in the wiki below: 

http://www.wiki.xilinx.com/HSI+debugging+and+optimization+techniques

 

See the Adding custom BSP, Library, Drivers, or SW Apps to SDK section