LWIP updating

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LWIP updating

Jump to solution
2,354 Views
pietrodicastri
Senior Contributor II

Good morning

I will update the LWIP version on an application built on the 1.4 version of the stack. 

This version is not calling the ethernetif_input(&fsl_netif0) in the loop. Also this version has the option to configure the

macro ENET_RECEIVE_ALL_INTERRUPT and call from the ISR the ethernetif_input(). 
In my understanding the porting is based on this function called from the main loop and no option to have it in the ISR context is available.

Fix me if I am not correct

Thank 

Pietro

Tags (1)
0 Kudos
Reply
1 Solution
2,123 Views
nxa33119
NXP Employee
NXP Employee

You are welcome Pietro. You can look at this file for the list of application changes required between different lwIP versions.

Best regards,

Stanislav

View solution in original post

0 Kudos
Reply
6 Replies
2,123 Views
nxa33119
NXP Employee
NXP Employee

Good morning Pietro,

The ethernetif port in our SDK uses two modes:

  • Bare metal without RTOS (NO_SYS=1) - in this mode, the application is supposed to call ethernetif_input() and sys_check_timeouts() from main loop. It is not supposed to call netif->input() (which is called from  ethernetif_input()) from the interrupt context, as described here: lwIP: Mainloop mode ("NO_SYS")
  • RTOS mode, where ethernetif_input() is called from the interrupt context.

If you use the bare metal mode and want to do some preprocessing of the incoming packets in the interrupt context, this requires modifications of at least the ethernetif port (ethernetif.c).

Best regards,

Stanislav

0 Kudos
Reply
2,123 Views
pietrodicastri
Senior Contributor II

Thank You Stanislav  for the hint. At least it is clear that I am compelled I need to use the mainloop. 
I am using an old 1.2 SDK for the running project, the dimension are too big for planning an update of the SDK, but I need to run the V6 and V4 in parallel so I need an update of the LWIP. If You know a guideline manual for the updating let me know

Thank You 

Pietro

0 Kudos
Reply
2,124 Views
nxa33119
NXP Employee
NXP Employee

You are welcome Pietro. You can look at this file for the list of application changes required between different lwIP versions.

Best regards,

Stanislav

0 Kudos
Reply
2,123 Views
pietrodicastri
Senior Contributor II

Hello Stanislav

I am grateful for the assistance. Effectively reading the reference file I don't find what I need. My plan for upgrading the stack is now to import a project with the new KSDK and the new LWIP and try to spot how to adapt it in my project using the older KSDK. If You can suggest yours or other's experience on the subject it could help..
Thank You

Best Regards

Pietro

0 Kudos
Reply
2,123 Views
nxa33119
NXP Employee
NXP Employee

Hello Pietro,

I don't have experience in porting of lwIP applications between different generations of SDK and I don't know your project. My guess is if you want to use the newer version of lwIP and the older version of SDK, you can try taking lwIP from the newer SDK but without the porting layer files like ethernetif.c (which depends on new SDK and its ethernet drivers). Instead take porting layer from the old SDK and adapt it to the newer version of lwIP when needed. The other porting layer files like cc.h, perf.h, sys_arch.h and sys_arch.c could be perhaps taken from the new SDK without much modification.

Best regards,

Stanislav

0 Kudos
Reply
2,123 Views
pietrodicastri
Senior Contributor II

Good morning al of You

No body has  a suggestion???

0 Kudos
Reply