|
 UltimaSerial
Windaq Add-ons
UltimaWaterfall
XChart
FFT1024

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
-
Download the source codes of the latest lwIP from http://mirrors.igsobe.com/nongnu/lwip/
-
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.
-
If you modified any source of lwip in your project, write
them down
-
Export your current project following AVR32 Studio->Project Explorer->YourProject->Export...->ArchiveFile,
with the name of B4IUpgradelwIP.zip
-
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.
-
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
-
Follow AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES
and delete the folder for lwip-1.3.0
-
Drag the folder lwip-1.3.0 created in step 2 and drop it
under AVR32 Studio-> Project Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES
-
Delete test folder under AVR32 Studio-> Project
Explorer->MyProject->src->SOFTWARE_FRAMEWORK->SERVICES->lwip-1.3.0
-
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
-
Here is a comment from Simon from lwIP forum: netif->input is the function passed to netif_add. For NO_SYS==1, there is no difference: you will pass ethernet_input to netif_add. However,
for NO_SYS==0, you will pass tcpip_input to netif_add, which means there's a thread change into the
tcpip_thread before calling ethernet_input. Without this, there can be multiple threads active in the core code, which is bound to lead to problems sooner or later.
-
Bring back you customization to the previous rev, which
was recorded in step 3
-
Double check the following folders to see if any new
compatibility issue may arise due to version upgrade
-
AVR32 Studio-> Project
Explorer->MyProject->src->CONFIG->lwipopts.h
-
AVR32 Studio-> Project
Explorer->MyProject->src->NETWORK->lwip-port->AT32UC3A
-
Your project should be able to compile at this point. If
not, clean up the errors.
|