lwIP project that was working in KDS 2.0 with MQX and PEx no longer works in KDS 3.0

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

lwIP project that was working in KDS 2.0 with MQX and PEx no longer works in KDS 3.0

Jump to solution
1,107 Views
dave408
Senior Contributor II

*** I apologize for cross posting.  It seems that there's less eyes in the MQX forum, so perhaps my question didn't belong there in the first place.  I am hoping that someone here will be able to help me figure out where I went wrong when porting from KDS2/KSDK1.1 to KDS3/KSDK1.2.

 

I had a very difficult time getting my lwIP application to work.  It took a little bit of luck in addition to great help from Marek Neuzil in my thread  Assistance needed with lwIP + PEx + KSDK to get it actually working.

 

The problem is, with the release of KDS 3.0 and KSDK 1.2, I had to create my project from scratch, and after following what I believe to be the same steps, my application does not work again.

 

The basic steps include:

  1. adding MQX and setting it to MQX Standard
  2. disabling DbgCs1 and adding a new fsl_uart shared component to MQX
  3. assigning fsl_uart to a random UART I don't need (as I am using semihosting)
  4. assigning pins to the ENET component in pin_init
  5. setting the RMII_MDIO pin to open drain, pulled up, and enabled
  6. adding the necessary header file include directories
  7. adding a link to fsl_phy_driver.c to my Source folder

(hopefully I didn't miss anything above)

 

Even after going through all of those steps again, my lwIP application runs and waits for an incoming connection, verified by single stepping through each line and checking for unhandled returned errors.  It all checks out fine, but I still cannot ping or connect.  However, the lwip demo application that comes with KSDK 1.2 works just fine.

 

Can anyone offer any assistance or advise?  I've also attached my sample project here.  Thank you!

Original Attachment has been moved to: KDS3_lwip_mqx_pex_test-(2).zip

Labels (1)
0 Kudos
1 Solution
759 Views
dave408
Senior Contributor II

Solution was to increase the TCP task's stack size.

View solution in original post

0 Kudos
3 Replies
759 Views
dave408
Senior Contributor II

By chance, I happened to notice something today as I was trying to debug the code.  As I was single stepping through my MQX task that does the TCP/IP stack initialization and other stuff, I happened to notice during a single step that ping responded!  I was shocked, so I moved a while(1) { OSA_TaskYield(); } line by line until my application stopped responding to ping.  It looks like ping responds all of the way up to the point where I call netconn_accept() to listen for my incoming connection request.

I'll start to focus on netconn_accept(), but any insight would be much appreciated!

0 Kudos
760 Views
dave408
Senior Contributor II

Solution was to increase the TCP task's stack size.

0 Kudos
759 Views
Carlos_Musich
NXP Employee
NXP Employee

Thank you for sharing your solution Dave.

Best regards,

Carlos

0 Kudos