AnsweredAssumed Answered


Question asked by jschepler on Dec 3, 2014

Hello all,


I have been trying to create my own http server on a TWR-K64F120M by referencing the httpserver and web_hvac demos in KDS with PEx enabled and using the MQX OS. I have chosen to
use this OS because of the TCP/IP stack available in the RTCS.


I followed the advice of another thread and made sure to add the RTCS library in C++ linker, and also added the ENET drivers in the Cross ARM C Compiler Includes.


I can create the RTCS with no problem by calling RTCS_Create(), but I am having a hard time initializing the ENET device using ipcfg_init_device() function.


When I run my code, I get an output of an unhandled interrupt at location 0x62 and 0x03.


After stepping through the code, I find this happens during ipcfg_init_device(), specifically after ENET_HAL_Enable, which is immediately after enabling the interrupts.


Also, in the httpserver demo there is this error check at the beggining:



#error Ethernet devices not defined!




#error No ethernet devices defined!



If I put this statement into my own project, I wil get the "No ethernet devices defined!" error. When I look at the declaration for BSP_ENET_DEVICE_COUNT
in httpserver demo, it goes to:


bsp_config.h, which is located in:


In my project, when
I open up the declaration of BSP_ENET_DEVICE_COUNT it goes to:


rtcscfg.h, which defines it to a value of 0.


I guess my real question comes down to this: What is the method for working with ENET in KDS with PEx with MQX?


Which files need to be included in the Includes tab?  The same ones from the demo programs?


I see in the httpserver demo program there is an include to C:\Freescale\MQX_KSDK_1.0.0\boards\common\phyksz8041

do I need to add this to my project? Or does PEx already contain the driver?


In httpserver, where do they apply settings for the ENET, for example RMII or MII...?


I appreciate any responses!