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.
Hi there,
I am using RM57Lx LaunchPad Development Kit. I am implementing Lwip for my project with the help of this link: http://processors.wiki.ti.com/index.php/HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration.
It is completely worked with TI compiler on CCS and assigns IP address properly.
But if I use GCC in CCS or I use IAR compiler(Generated EMAC code for IAR using HALCOGen) and it shows an error in initializing Hardware and not assign the IP address.
And error looks like:
=========================================
Texas Instruments
Little Endian device
Initializing ethernet (DHCP)
DEBUG - Getting PHY ID...SUCCESS
DEBUG - Getting PHY Alive Status...SUCCESS
DEBUG - Getting PHY Link Status...SUCCESS
DEBUG - Setting up Link...SUCCESS
..DONE
-------- ERROR INITIALIZING HARDWARE --------
=========================================
Also note that :
For IAR complier there is linking error of this 4 functions _enable_FIQ(), _enable_IRQ(), _disable_IRQ(), _get_CPSR() which is written in lwip_main.c,in may case i commented this 4 function for now.
Please help or guide me to solve out this issue.
Thanks in Advance,
Keyur Joshi
Hello Keyur,
It is better to step in lwipInit() to check if BYTE_ORDER LITTLE_ENDIAN takes effect.
There are a bunch of things that can influence the byte swapping in LWIP:
e.g.
LWIP_PLATFORM_BYTE_SWAP
LWIP_PLATFORM_HTONS()
LWIP_PLATFORM_HTONL()
Hello Wang,
Thanks for your suggestion, but it is not worked in my case.
One my colleague already asked about this scenario with was mention in below thread:
e2e.ti.com/.../791963
As a continuation of the above thread, I attached the GCC code and IAR code for your reference.
With both IAR and GCC ip address is not assign.I use the same code base which is mention in processors.wiki.ti.com/.../LAUNCHXL2_RM57L:_lwIP_Demo(It works fine with TI compiler(using CCS))
Below are some explanation of the issue:
++++++++++++++++For GCC(Using CCS)++++++++++++++++
In file example\hdk\src\lwip_main.c, debugger hit line no 128
and after that it shows error like this:
================================================
HERCULES MICROCONTROLLERS
Texas Instruments
Little Endian device
Initializing ethernet (DHCP)
DEBUG - Getting PHY ID....SUCCESS
DEBUG - Getting PHY Alive Status...SUCCESS
DEBUG - Getting PHY Link Status...SUCCESS
DEBUG - Setting up Link...SUCCESS
..DONE
-------- ERROR INITIALIZING HARDWARE --------
================================================I
++++++++++++++++For IAR(Using IAR workbench)++++++++++++++++
In file lwip-1.4.1\src\core\dhcp.c, debugger hit line no.902 function dhcp_delete_msg(),
and it is stuck, may be it can't find properly memory address.
and after that it shows error like this:
================================================
HERCULES MICROCONTROLLERS
Texas Instruments
Little Endian device
Initializing ethernet (DHCP)
DEBUG - Getting PHY ID....SUCCESS
DEBUG - Getting PHY Alive Status...SUCCESS
DEBUG - Getting PHY Link Status...SUCCESS
DEBUG - Setting up Link...SUCCESS
(Stuck)(Added by me)
================================================I
In Both cases, I am using HALCOgen to generated code using TOOLS IAR and GCC.
Please find attached code, I also attached TI code1581.IAR_Lwip.zip2475.GCC_Lwip.zip4442.TI_Lwip.zip.
Please help me to solve out this issue.
Thanks in Advance,
Keyur
Hello Wang,
Did you tried any of the projects which I was sent in regarding ethernet?
Kindly guide me on this.
Thanks,
Keyur
Hi Keyur,
I am sorry I did not the code using GCC and IAR compiler. I don't have IAR workbench.