AnsweredAssumed Answered

Ethernet using MQX

Question asked by Tushar M on Jul 18, 2013
Latest reply on Jul 19, 2013 by Tushar M

Hello,

 

       I working on K60 TWR, i m using Codewarrior 10.4 with MQX 4.0, I m trying to execute a simple Ethernet program with mqx 4.0 with static ip, but i m not able to execute the code for at least ping.

Code:

 

#include "main.h"

#if !defined(RAM_DISK_SIZE)

#error Please specify RAM_DISK_SIZE

#endif

const SHELL_COMMAND_STRUCT Shell_commands[] = {

   /* MFS commands */

   { "cd",        Shell_cd },     

   { "copy",      Shell_copy },

   { "create",    Shell_create },

   { "del",       Shell_del },      

   { "disect",    Shell_disect},     

   { "dir",       Shell_dir },     

   { "format",    Shell_format },

   { "mkdir",     Shell_mkdir },    

   { "pwd",       Shell_pwd },      

   { "read",      Shell_read },     

   { "ren",       Shell_rename },   

   { "rmdir",     Shell_rmdir },

   { "type",      Shell_type },

   { "write",     Shell_write },

 

   /* RTCS commands */

   { "arpadd",    Shell_arpadd },

   { "arpdel",    Shell_arpdel },

   { "arpdisp",   Shell_arpdisp },    

   { "gate",      Shell_gate },

   { "gethbn",    Shell_get_host_by_name },

   { "getrt",     Shell_getroute },

   { "ipconfig",  Shell_ipconfig },     

   { "netstat",   Shell_netstat },  

#if RTCSCFG_ENABLE_ICMP     

   { "ping",      Shell_ping },     

#endif

   { "telnet",    Shell_Telnet_client },

   { "telnetd",   Shell_Telnetd },

   { "walkrt",    Shell_walkroute },

 

 

/*    Add your custom shell commands here    */

/* { "command_name",        Your_function }, */

   { "sh",        Shell_sh },

   { "help",      Shell_help },

   { "?",         Shell_command_list },   

   { "exit",      Shell_exit },

   { NULL,        NULL },

};

 

 

const SHELL_COMMAND_STRUCT Telnetd_shell_commands[] = {

   /* RTCS commands */

   { "exit",      Shell_exit },     

   { "gethbn",    Shell_get_host_by_name },

   { "getrt",     Shell_getroute },

   { "help",      Shell_help },

   { "ipconfig",  Shell_ipconfig },     

   { "netstat",   Shell_netstat },

   { "pause",     Shell_pause },

#if RTCSCFG_ENABLE_ICMP     

   { "ping",      Shell_ping },

#endif

   { "telnet",    Shell_Telnet_client },

   { "walkrt",    Shell_walkroute },

   { "?",         Shell_command_list },    

   { NULL,        NULL }

};

 

TASK_TEMPLATE_STRUCT MQX_template_list[] =

{

/*  Task number, Entry point, Stack, Pri, String, Auto? */

   {MAIN_TASK,   Main_task,   2000,  9,   "main", MQX_AUTO_START_TASK},

   {0,           0,           0,     0,   0,      0,                 }

};

 

I m getting output on Hyper terminal as follows:

 

Ramdisk initialized to a:\

NOT A DOS DISK! You must format to continue.

 

Waiting for ethernet cable plug in ...

 

Please give me solution for this...

 

Thank you,

Tushar M

 

 

Outcomes