This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

About AM437x LWIP transplantation to sys/bios

Other Parts Discussed in Thread: SYSBIOS

Hi everyone:

    In EVMAM437x I want to put the LWIP transplant to SYS/BIOS ,I commented three interrupt configuration in  enet_app_httpever example of startware ,
and added Three new interrupt in the sys/BIOS.It printed the configuration information is normal, and can response to the receive interrupt "LWIPCpswRxIsr".But the received packet size and content of infomation is abnormal, and it was unable to response the TX"LWIPCpswTxIsr" interrupt.In result,the ping command can not be achieved.clould you please tell me what should i do.

The following is the place where I modify:

"lwip_lib/lwip_cpws.c"

"utils/dmtimer_utils.c"

New HWI configuration:

thanks

aria li

  • Hello,

    A similar implementation was done in IA-SDK for AM335x. You can probably refer to the adaptations made from Starterware to make it work over SYS/Bios.

    Regards,
    Vinesh
  • Hi Aria,
    Did u succeed in porting LWIP for AM437x using SYSBIOS?
  • hi jinu

    yes,i did.

    what's the matter?

    Best Regards!

    Aria li

  • Hi Aria Li,

    We are trying to port LWIP on SYSBIOS. But getting the following error while compiling the project on sys_arch.c file.

    expected '=', ',', ';', 'asm' or '__attribute__' before '{' token sys_arch.c 

    When you started the project which library you used ? lwip-1.4.1 or lwip-1.4.0 ?

    i used follolwing settings.

    1) in lwipoopts.h 

    #define SYS_LIGHTWEIGHT_PROT 1
    #define NO_SYS 0
    #define NO_SYS_NO_TIMERS 1

    it would be great help if you can guide on this issue.  

    Regards,

    Jinu 

  • Hi Jinu 

    I used lwip-1.4.1.

    in lwippopts.h

    /*****************************************************************************
    ** Platform specific locking
    *****************************************************************************/
    #define SYS_LIGHTWEIGHT_PROT 1
    #define NO_SYS 1
    #define NO_SYS_NO_TIMERS 1

    Regards,

    Aria li

  • Hi Aria li,

    Thanks for the reply.
    I removed the sys_arch.c file from project, now it is getting compiled. But DHCP unable to assign IP address

    Acquiring IP Address for Port 1...
    PHY found at address 0.
    Gigabit Full duplex is not supported!!!.
    Performing Auto-Negotiation...
    Auto-Negotiation Successful.
    Transfer Mode : 1000 Mbps Full Duplex.
    PHY link verified for Port 1 of Instance 0.
    DHCP Trial 1...
    DHCP Trial 2...
    DHCP Trial 3...
    DHCP Trial 4...
    DHCP Trial 5...
    Unable to complete DHCP!

    Port 1 IP Address Acquisition Failed.

    Did you changed anything on lwiplib file ?

    Did u used
    netif_add(&netIf[netIfNum], &ipAddr, &netMask, &gwAddr, pPortIf, LWIPPortInit, tcpip_input))
    or
    netif_add(&netIf[netIfNum], &ipAddr, &netMask, &gwAddr, pPortIf, LWIPPortInit, ip_input))

    in lwiplib.c file?

    If possible, can you please let me know what are the changes you have done in LWIP library files.

    I assigned the interrupt on SYSBIOS HWI and also free running timer is added.


    Regards,
    Jinu

  • Hi Jinu
    I think ”sys_arch.c“is very important.It is best not to removed .
    About this error, you'd better tracking code, looking for the wrong reasons.

    Regards,
    Aria li
  • Hi Aria li,
    From lwip.wikia.com/.../Porting_For_Bare_Metal website, it is given that for a Bare metal application porting,
    Number 1 setting is to define the preprocessor symbol NO_SYS to 1.
    Thats why i define NO_SYS 0 in my project. In your earlier mail, you mentioned your settings as NO_SYS =1.

    if it is possible, Can you please tell me which all library files you changed? This information will surely help me to integrate this code.

    Regards,
    Jinu
  • Hi Aria Li,

    We are getting struck at exact place you mentioned above in LWIP code porting. unable to establish Ping command.

    It wouldl be a great help if you can tell us the hints or steps you tried to get the code working.

    Regards,

    Jinu Jacob