UltimaSerial Tech Blog: How to upgrade lwIP in AVR32 Framework to the latest version

Data logger
UltimaSerial

 

Windaq add-ons
Windaq Add-ons

 

Spectrogram
UltimaWaterfall

 

Ultimaserial XChart
XChart

 

FFT1024
FFT1024

 

Ultimaserial Classroom
Lessons

The AVR32 port of the lwIP 1.3.0  is old and buggy, so we need to upgrade it to the latest rev. 

Assume your project is named as MyProject

  1. Download the source codes of the latest lwIP from http://mirrors.igsobe.com/nongnu/lwip/

  2. Extract it to a folder, say lwip-1.3.0. I am keeping the same name as the one in AVR32 Framework to minimize any confusion.

  3. If you modified any source of lwip in your project, write them down

  4. Export your current project following AVR32 Studio->Project Explorer->YourProject->Export...->ArchiveFile, with the name of B4IUpgradelwIP.zip

  5. Follow AVR32 Studio->File->Switch Workspace->Others->Browse to create a new folder to host the new workspace so that we won't mess up the original project by accident. 

  6. Follow AVR32 Studio->Project Explorer->Import...->General->Existing Projects in Workspace->Select archive file to bring the archive created in step 4 to the new workspace created in 5. Follow 

  7. Follow AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES and delete the folder for lwip-1.3.0

  8. Drag the folder lwip-1.3.0 created in step 2 and drop it under AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES

  9. Delete test folder under AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES->lwip-1.3.0

  10. In AVR32 Studio-> Project Explorer->MyProject->src->NETWORK->lwip-port->AT32UC32A->netif->ethernetif.c, change if( ERR_OK != ethernet_intput->input( p, netif ) ) to if( ERR_OK != netif->input( p, netif ) ). See the similar section in the source of AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES->lwip-1.3.0->netif->ethernetif.c for reference

  11. Bring back you customization to the previous rev, which was recorded in step 3

  12. Your project should be able to compile at this point. If not, clean up the errors.