TelenkovDmitry 7 лет назад
Родитель
Сommit
49aa6c2100

+ 7 - 3
modules/Ethernet/lwipopts.h

@@ -175,6 +175,8 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
   #define CHECKSUM_CHECK_UDP              0
   /* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/
   #define CHECKSUM_CHECK_TCP              0
+  /* CHECKSUM_CHECK_ICMP==0: Check checksums by hardware for incoming ICMP packets.*/  
+  #define CHECKSUM_GEN_ICMP               0
 #else
   /* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/
   #define CHECKSUM_GEN_IP                 1
@@ -188,6 +190,8 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
   #define CHECKSUM_CHECK_UDP              1
   /* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/
   #define CHECKSUM_CHECK_TCP              1
+  /* CHECKSUM_CHECK_ICMP==1: Check checksums by hardware for incoming ICMP packets.*/  
+  #define CHECKSUM_GEN_ICMP               1
 #endif
 
 
@@ -228,11 +232,11 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
 #define UDP_DEBUG                       LWIP_DBG_OFF
 #define SOCKETS_DEBUG                   LWIP_DBG_OFF
 #define MEMP_DEBUG                      LWIP_DBG_OFF
-#define PING_DEBUG                      LWIP_DBG_ON
+#define PING_DEBUG                      LWIP_DBG_OFF
 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF
 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF
-#define TIMERS_DEBUG                    LWIP_DBG_ON
-#define ICMP_DEBUG                      LWIP_DBG_ON
+#define TIMERS_DEBUG                    LWIP_DBG_OFF
+#define ICMP_DEBUG                      LWIP_DBG_OFF
 
 /*
    ---------------------------------

+ 1 - 0
modules/Ethernet/netconf.c

@@ -109,6 +109,7 @@ void LwIP_Init(void)
 	
 	  netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
       netif_set_default(&xnetif);
+      netif_set_link_up(&xnetif);
       netif_set_up(&xnetif); 
     }	
     else

+ 4 - 4
thirdparty/lwip/src/include/lwip/arch.h

@@ -116,10 +116,10 @@
 /* Define generic types used in lwIP */
 #if !LWIP_NO_STDINT_H
 #include <stdint.h>
-typedef uint8_t   u8_t;
-typedef int8_t    s8_t;
-typedef uint16_t  u16_t;
-typedef int16_t   s16_t;
+//typedef uint8_t   u8_t;
+//typedef int8_t    s8_t;
+//typedef uint16_t  u16_t;
+//typedef int16_t   s16_t;
 typedef uint32_t  u32_t;
 typedef int32_t   s32_t;
 typedef uintptr_t mem_ptr_t;

+ 1 - 2
user/init_task.c

@@ -135,14 +135,13 @@ void InitTask(void *params)
 #ifdef NET_ENABLE
   ETH_BSP_Config();
   LwIP_Init();
-#if 0  
 #ifdef WEB_SERVER_ENABLE
   //HTTP_Init();
   HTTPS_Init();
 #define SSL_TASK_PRIO   ( configMAX_PRIORITIES - 3 )
   xTaskCreate(ssl_server, "SSL", 10*configMINIMAL_STACK_SIZE, NULL, SSL_TASK_PRIO, NULL); 
 #endif
-  
+#if 0  
 #ifdef SNMP_ENABLE
 
   SNMP_Init();