Modification to work two socket servers at the same time

Fork of lwip by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Apr 24 10:45:42 2014 +0100
Parent:
15:c486879eba14
Child:
17:335b94e0aa9c
Commit message:
Synchronized with git revision 94fd2228fb4a382fb98d0115f6691fc0b659eea8

Full URL: https://github.com/mbedmicro/mbed/commit/94fd2228fb4a382fb98d0115f6691fc0b659eea8/

Currently NET_7 (HttpClient test) and NET_8 (NTP test) fail for
unknown reasons.

Changed in this revision

core/mem.c Show annotated file Show diff for this revision Revisions of this file
core/memp.c Show annotated file Show diff for this revision Revisions of this file
include/lwip/mem.h Show annotated file Show diff for this revision Revisions of this file
lwipopts.h Show annotated file Show diff for this revision Revisions of this file
--- a/core/mem.c	Thu Mar 20 15:45:43 2014 +0000
+++ b/core/mem.c	Thu Apr 24 10:45:42 2014 +0100
@@ -186,8 +186,10 @@
 #  else
 #     define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
 #  endif
+#elif defined(TARGET_LPC1768)
+#   define ETHMEM_SECTION __attribute((section("AHBSRAM0")))
 #else
-#   define ETHMEM_SECTION __attribute((section("AHBSRAM0")))
+#		define ETHMEM_SECTION
 #endif
 
 /** the heap. we need one struct mem at the end and some room for alignment */
@@ -609,10 +611,10 @@
         sys_mutex_unlock(&mem_mutex);
         LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
          (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
-        LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
-         ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
+				LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
+						((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
         LWIP_ASSERT("mem_malloc: sanity check alignment",
-          (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0);
+						(((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0);
 
         return (u8_t *)mem + SIZEOF_STRUCT_MEM;
       }
--- a/core/memp.c	Thu Mar 20 15:45:43 2014 +0000
+++ b/core/memp.c	Thu Apr 24 10:45:42 2014 +0100
@@ -168,7 +168,7 @@
 
 #if defined(TARGET_LPC1768)
 #  define ETHMEM_SECTION __attribute((section("AHBSRAM1")))
-#else
+#elif defined(TARGET_LPC4088) || defined(TARGET_K64F)
 #  define ETHMEM_SECTION 
 #endif
 
--- a/include/lwip/mem.h	Thu Mar 20 15:45:43 2014 +0000
+++ b/include/lwip/mem.h	Thu Apr 24 10:45:42 2014 +0100
@@ -115,6 +115,7 @@
 #define LWIP_MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & ~(mem_ptr_t)(MEM_ALIGNMENT-1)))
 #endif
 
+
 #ifdef __cplusplus
 }
 #endif
--- a/lwipopts.h	Thu Mar 20 15:45:43 2014 +0000
+++ b/lwipopts.h	Thu Apr 24 10:45:42 2014 +0100
@@ -48,12 +48,6 @@
 // 32-bit alignment
 #define MEM_ALIGNMENT               4
 
-#if defined(TARGET_LPC4088)
-#define MEM_SIZE                    15360
-#else
-#define MEM_SIZE                    16362
-#endif
-
 #define PBUF_POOL_SIZE              5
 #define MEMP_NUM_TCP_PCB_LISTEN     4
 #define MEMP_NUM_TCP_PCB            4