balbekova пре 7 година
родитељ
комит
df7e34a1a0

+ 1 - 1
Makefile

@@ -1,4 +1,4 @@
-TARGETS = projects/gcc/tools iap modules service_hw  
+TARGETS = projects/gcc/tools  modules service_hw  #iap
 BUILDDIR = build
 
 .PHONY: all config $(TARGETS) tools distclean

+ 4 - 1
modules/Ethernet/sntp.c

@@ -1,10 +1,13 @@
-//#include "sntp.h"
+#include "sntp.h"
 #include "rtc.h"
 #include "settings_api.h"
 
 #include <string.h>
 #include <time.h>
 
+#include "FreeRTOS.h"
+#include "task.h"
+
 #ifdef PRINTF_STDLIB
 #include <stdio.h>
 #endif

+ 3 - 4
modules/Makefile

@@ -76,10 +76,11 @@ CSRC += $(wildcard ../thirdparty/FreeRTOS/portable/MemMang/heap_4.c)
     INCLUDES += -I../thirdparty/lwip/src/include
     INCLUDES += -I../thirdparty/lwip/src/include/netif
     INCLUDES += -I../thirdparty/lwip/src/include/lwip
-    INCLUDES += -I../thirdparty/lwip/src/include/ipv4
+    INCLUDES += -I../thirdparty/lwip/src/include/lwip/apps
     INCLUDES += -I../thirdparty/lwip/src/netif/ppp
     INCLUDES += -I../thirdparty/lwip/port
     INCLUDES += -I../thirdparty/lwip/port/FreeRTOS
+    INCLUDES += -I../thirdparty/lwip/system
     INCLUDES += -IEthernet
  # INCLUDES += -I../stm32/stm32f4x7_ethernet 
  	INCLUDES += -ISTM32F4x7_ETH_Driver
@@ -90,9 +91,7 @@ CSRC += $(wildcard ../thirdparty/FreeRTOS/portable/MemMang/heap_4.c)
     CSRC += $(wildcard ../thirdparty/lwip/src/api/*.c)
     CSRC += $(wildcard ../thirdparty/lwip/src/core/*.c)
     CSRC += $(wildcard ../thirdparty/lwip/src/core/ipv4/*.c)
-    CSRC += $(wildcard ../thirdparty/lwip/src/core/snmp/*.c)
-    CSRC += $(wildcard ../thirdparty/lwip/src/netif/*.c)
-    CSRC += $(wildcard ../thirdparty/lwip/src/netif/ppp/*.c)
+#    CSRC += $(wildcard ../thirdparty/lwip/src/netif/ppp/*.c)
     CSRC += $(wildcard ../thirdparty/lwip/port/FreeRTOS/*.c)
     CSRC += $(wildcard Ethernet/*.c)
   #  CSRC += $(wildcard ../stm32/stm32f4x7_ethernet/*.c)

+ 3 - 3
modules/parameters.c

@@ -990,13 +990,13 @@ void SetSntpStateStr(char *str)
   if (strncmp(str, "1", 1) == 0){
 	sSettings.sSNTP.sntpEnable = true;
 	if(old_sntpEnable != sSettings.sSNTP.sntpEnable){
-		SNTP_Enable(sSettings.sSNTP.sntpEnable);
-		SNTP_Poll();
+	//	SNTP_Enable(sSettings.sSNTP.sntpEnable);
+	//	SNTP_Poll();
 	}
   }
   else{
 	sSettings.sSNTP.sntpEnable = false;
-	SNTP_Enable(sSettings.sSNTP.sntpEnable);
+//	SNTP_Enable(sSettings.sSNTP.sntpEnable);
   }
 }
 

+ 7 - 0
thirdparty/FreeRadius/include/includes.h

@@ -39,7 +39,12 @@
 //#include <sys/types.h>
 
 #include <ctype.h>
+#ifdef PRINTF_STDLIB
 #include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include <errno.h>
 
 #ifdef HAVE_NETDB_H
@@ -183,7 +188,9 @@ int sigprocmask (int, sigset_t *, sigset_t *);
 #endif
 
 /* rlib/lock.c */
+#if 0
 int do_lock_exclusive(FILE *);
 int do_unlock(FILE *);
+#endif
 
 #endif

+ 4 - 3
thirdparty/FreeRadius/lib/avpair.c

@@ -860,7 +860,7 @@ char *rc_avpair_log(rc_handle const *rh, VALUE_PAIR *pair, char *buf, size_t buf
 #endif    
 	return buf;
 }
-
+#if 0
 /** Get a sequence of attribute value pairs from the file input and make them into a list of value_pairs
  *
  * @param rh a handle to parsed configuration.
@@ -870,7 +870,7 @@ char *rc_avpair_log(rc_handle const *rh, VALUE_PAIR *pair, char *buf, size_t buf
 VALUE_PAIR *rc_avpair_readin(rc_handle const *rh, FILE *input)
 {
 	VALUE_PAIR *vp = NULL;
-#if 0  
+
 	char buffer[1024], *q;
 
 	while (fgets(buffer, sizeof(buffer), input) != NULL)
@@ -888,6 +888,7 @@ VALUE_PAIR *rc_avpair_readin(rc_handle const *rh, FILE *input)
 			return NULL;
 		}
 	}
-#endif
+
 	return vp;
 }
+#endif

+ 1 - 1
thirdparty/lwip/port/FreeRTOS/ethernetif.c

@@ -51,7 +51,7 @@
 #include "netif/etharp.h"
 #include "err.h"
 #include "ethernetif.h"
-//#include "lwip/timers.h"
+#include "lwip/timeouts.h"
 
 #include "common_config.h"
 #include "settings_api.h"

+ 12 - 1
thirdparty/lwip/src/include/lwip/arch.h

@@ -77,7 +77,12 @@
  */
 #ifndef LWIP_PLATFORM_DIAG
 #define LWIP_PLATFORM_DIAG(x) do {printf x; printf("\r\n");} while(0)
+#ifdef PRINTF_STDLIB
 #include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include <stdlib.h>
 #endif
 
@@ -89,7 +94,12 @@
 #ifndef LWIP_PLATFORM_ASSERT
 #define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \
                                      x, __LINE__, __FILE__); fflush(NULL); abort();} while(0)
+#ifdef PRINTF_STDLIB
 #include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include <stdlib.h>
 #endif
 
@@ -122,7 +132,8 @@
 //typedef int16_t   s16_t;
 typedef uint32_t  u32_t;
 typedef int32_t   s32_t;
-typedef uintptr_t mem_ptr_t;
+//typedef uintptr_t mem_ptr_t;
+typedef unsigned long mem_ptr_t;
 #endif
 
 /** Define this to 1 in arch/cc.h of your port if your compiler does not provide

+ 6 - 1
thirdparty/lwip/src/include/netif/ppp/ppp_impl.h

@@ -41,7 +41,12 @@
 #include "ppp_settings.h"
 #endif
 
-#include <stdio.h> /* formats */
+#ifdef PRINTF_STDLIB
+#include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include <stdarg.h>
 #include <string.h>
 #include <stdlib.h> /* strtol() */

+ 5 - 0
thirdparty/lwip/src/netif/ppp/ppp_oe.c

@@ -81,7 +81,12 @@
 #include "lwip/memp.h"
 
 #include <string.h>
+#ifdef PRINTF_STDLIB
 #include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 
 
 /* Add a 16 bit unsigned value to a buffer pointed to by PTR */

+ 5 - 0
thirdparty/lwip/system/arch/cc.h

@@ -33,7 +33,12 @@
 #define __CC_H__
 
 #include "cpu.h"
+#ifdef PRINTF_STDLIB
 #include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include <stdlib.h>
 
 typedef unsigned   char    u8_t;