K64F Ethernet - lwip problem

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

K64F Ethernet - lwip problem

1,273 Views
paulfargotstein
Contributor I

I have a K64F based board that I'm trying to port the tcpecho code example to.  The board runs the stock bare metal tcpecho code fine but I'm trying to bring up the code with PE so I can add other components. I used the steps in the "lwip with FreeRTOS" tutorial that was recently released to configure Ethernet, but to get a build I had to add a pit timer (required by lwip).  The only thing different from the tutorial is I'm not routing the 1588 timer pins as they're used elsewhere.  I'm using the main.c and echo.h files from the original example source and everything builds ok but the code doesn't work.  I have no idea what to set the pit timer interval to and looking at the tcpecho source code didn't help.  Can anybody help on this one?  Is there anything else I should be aware of to get this code running?

Thanks,

Paul

Labels (1)
Tags (4)
0 Kudos
2 Replies

513 Views
paulfargotstein
Contributor I

I stumbled on this doc that explains what to set the pit timer to - 1msec as well as some other settings:

Lightweight TCP/IP (lwIP) Stack with SDK

However, tcpecho still fails. Checked the #if's in main.c and they are correct.  Not sure where to go from here other than grinding through files.  Any suggestions on where to focus?

0 Kudos

513 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Paul,

- You can follow slides 0 - 7 from How to add RTCS to a Processor Expert Project Using KDS and KSDK to create a PEx project.

- Then in slide 8 switch MQX_KSDK option to FreeRTOS (if you need it)

- After this follow slides 18 - 20 for ENET pin config.

- Copy the whole lwip folder from the following path into your project. C:\Freescale\KSDK_1.2.0\middleware\tcpip

- In the lwip that was copied into the project it is necessary to delete all ipv6 folders.

  • \lwip\src\core\ipv6
  • \lwip\src\include\ipv6

- Add your application's code.

- You may need to add the following paths in the compiler Include settings

../lwip/port

../lwip/port/arch

../lwip/src/api

../lwip/src/core

../lwip/src/core/ipv4

../lwip/src/core/snmp

../lwip/src/include

../lwip/src/include/ipv4

../lwip/src/include/ipv4/lwip

../lwip/src/include/lwip

../lwip/src/include/netif

../lwip/src/include/posix

../lwip/src/include/posix/sys

C:\Freescale\KSDK_1.2.0\platform\osa\inc

C:\Freescale\KSDK_1.2.0\platform\CMSIS\Include

C:\Freescale\KSDK_1.2.0\platform\devices

C:\Freescale\KSDK_1.2.0\platform\devices\MK64F12\include

C:\Freescale\KSDK_1.2.0\platform\hal\inc

C:\Freescale\KSDK_1.2.0\platform\drivers\inc

C:\Freescale\KSDK_1.2.0\platform\system\inc

- You may also compare the preprocessor settings form TCP_echo demo with your project's settings.

I hope this helps.


Best regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos