one5532 发表于 2011-1-18 11:00:49

我的板子用RTT自带的LWIP.ping不通,急!

cpu是LM3S9B95.RTT用0.0.3.0-LM3S版本。OS运行正常。
#define RT_USING_LWIP
/* Trace LwIP protocol*/
/* #define RT_LWIP_DEBUG */

/* Enable ICMP protocol*/
#define RT_LWIP_ICMP

/* Enable IGMP protocol*/
#define RT_LWIP_IGMP

/* Enable UDP protocol*/
#define RT_LWIP_UDP

/* Enable TCP protocol*/
#define RT_LWIP_TCP

/* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM        5

/* Ethernet padding size */
#define RT_LWIP_ETH_PAD_SIZE 2
               
/* TCP sender buffer space*/
#define RT_LWIP_TCP_SND_BUF        1024*8
/* Enable SNMP protocol*/
/* #define RT_LWIP_SNMP */

/* Using DHCP*/
/* #define RT_LWIP_DHCP */

#define RT_LWIP_DNS

/* ip address of target*/
#define RT_LWIP_IPADDR0        192
#define RT_LWIP_IPADDR1        168
#define RT_LWIP_IPADDR2        0
#define RT_LWIP_IPADDR3        30

/* gateway address of target*/
#define RT_LWIP_GWADDR0        192
#define RT_LWIP_GWADDR1        168
#define RT_LWIP_GWADDR2        0
#define RT_LWIP_GWADDR3        1

/* mask address of target*/
#define RT_LWIP_MSKADDR0        255
#define RT_LWIP_MSKADDR1        255
#define RT_LWIP_MSKADDR2        255
#define RT_LWIP_MSKADDR3        0

/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY                22
#define RT_LWIP_TCPTHREAD_MBOX_SIZE                4
#define RT_LWIP_TCPTHREAD_STACKSIZE                1024

/* ethernet if thread options */
#define RT_LWIP_ETHTHREAD_PRIORITY                23
#define RT_LWIP_ETHTHREAD_MBOX_SIZE                4
#define RT_LWIP_ETHTHREAD_STACKSIZE                512

默认网关和掩码与PC相同
这样设置对吗?
谢谢!

itspy 发表于 2011-1-18 11:03:33

设置没有什么错,你可以试着直接和PC相连来PING一下。

one5532 发表于 2011-1-19 16:51:24

回复【1楼】itspy
-----------------------------------------------------------------------

谢谢!问题已解决。是网线的问题
页: [1]
查看完整版本: 我的板子用RTT自带的LWIP.ping不通,急!