Sergey Alirzaev 5 жил өмнө
parent
commit
3d2c89ef6b

+ 0 - 1
iap/User/main.c

@@ -11,7 +11,6 @@
 #include "crc.h"
 #include "wdg.h"
 #include "tinystdio.h"
-#include "time.h"
 #include "string.h"
 
 #include "stm32f4x7_eth.h"

+ 3 - 1
modules/Makefile

@@ -96,7 +96,6 @@ CSRC += $(wildcard ../thirdparty/FreeRTOS/portable/MemMang/heap_4.c)
     INCLUDES += -I../thirdparty/lwip_patched/port/FreeRTOS
     INCLUDES += -I../thirdparty/lwip_patched/system
     INCLUDES += -I../thirdparty/lwip_patched/system/arch
-    CFLAGS += -DLWIP_TIMEVAL_PRIVATE=0
     INCLUDES += -IEthernet
  # INCLUDES += -I../stm32/stm32f4x7_ethernet 
  	INCLUDES += -ISTM32F4x7_ETH_Driver
@@ -123,6 +122,9 @@ ifneq (,$(filter $(HARDWARE),bt6707 bt6709))
 		#CFLAGS += -DDEBUG_WOLFSSH
 		INCLUDES += -ISSH_Server
 		CSRC += $(wildcard SSH_Server/*.c)
+
+		# for pre-C99 compilers
+		CFLAGS += -DXSTRNCASECMP=lwip_strnicmp
 	endif
 endif
     CSRC += $(wildcard HTTP_Server/trap_params.c)

+ 1 - 0
peripheral_modules/inc/spi_flash.h

@@ -5,6 +5,7 @@
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #ifdef PRINTF_STDLIB
 #include <stdio.h>
 #endif

+ 2 - 0
peripheral_modules/src/spi_flash.c

@@ -1,5 +1,7 @@
 #include "stm32f4xx_conf.h"
 #include "stm32f4xx.h"
+#include <stddef.h>
+#include <unistd.h>
 
 #include "spi_flash.h"
 #include "gpio.h"

+ 0 - 4
thirdparty/TinyStdio/tinystdio.c

@@ -40,10 +40,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 /*
  * Configuration adjustments
  */
-#ifdef PRINTF_SIZE_T_SUPPORT
-#include <sys/types.h>
-#endif
-
 #ifdef PRINTF_LONG_LONG_SUPPORT
 # define PRINTF_LONG_SUPPORT
 #endif

+ 4 - 1
thirdparty/TinyStdio/tinystdio.h

@@ -137,7 +137,10 @@ Update from  Cebotari Vladislav
 /* Optional external types dependencies */
 
 #if TINYPRINTF_DEFINE_TFP_SPRINTF
-# include <sys/types.h>  /* size_t */
+// Do not depend on POSIX presence
+//# include <sys/types.h>  /* size_t */
+// Use ISO C header
+#include <stddef.h>
 #endif
 
 /* Declarations */

+ 3 - 0
thirdparty/lwip/src/include/lwip/sockets.h

@@ -438,10 +438,13 @@ typedef struct fd_set
 #endif
 
 #if LWIP_TIMEVAL_PRIVATE
+#ifndef _TIMEVAL_DEFINED
+#define _TIMEVAL_DEFINED
 struct timeval {
   long    tv_sec;         /* seconds */
   long    tv_usec;        /* and microseconds */
 };
+#endif
 #endif /* LWIP_TIMEVAL_PRIVATE */
 
 #define lwip_socket_init() /* Compatibility define, no init needed. */