Hello,
Please check the below example code, you can find more information in the Freescale MQX™ RTOS RTCS User's Guide. This document is located at the path: C:\Freescale\KSDK_1.2.0\doc\tcpip\mqx_rtcs
#define ENET_IPADDR IPADDR(192,168,1,4)
#define ENET_IPMASK IPADDR(255,255,255,0)
#define ENET_IPGATEWAY IPADDR(192,168,1,1)
uint32_t setup_network(void)
{
uint32_t error;
_enet_address enet_address;
error = RTCS_create();
if (error) return error;
ENET_get_mac_address (BSP_DEFAULT_ENET_DEVICE, ENET_IPADDR, enet_address);
error = ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, enet_address);
if (error) return error;
error = ipcfg_bind_boot(BSP_DEFAULT_ENET_DEVICE);
if (error) return error;
TFTTIP = ipcfg_get_tftp_serveraddress(BSP_DEFAULT_ENET_DEVICE);
TFTPserver = ipcfg_get_tftp_servername(BSP_DEFAULT_ENET_DEVICE);
TFTPfile
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------