lwip_bleedingedge

Fork of lwip by mbed official

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Thu May 30 17:11:58 2013 +0100
Parent:
9:5bba32bf3eb6
Child:
11:4b3f6f8b92d2
Commit message:
Add LPC4088 target

Changed in this revision

core/dhcp.c Show annotated file Show diff for this revision Revisions of this file
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
netif/ppp/pap.c Show annotated file Show diff for this revision Revisions of this file
--- a/core/dhcp.c	Fri Mar 01 15:35:46 2013 +0000
+++ b/core/dhcp.c	Thu May 30 17:11:58 2013 +0100
@@ -115,7 +115,7 @@
 #define DHCP_OPTION_IDX_T2          5
 #define DHCP_OPTION_IDX_SUBNET_MASK 6
 #define DHCP_OPTION_IDX_ROUTER      7
-#define DHCP_OPTION_IDX_DNS_SERVER    8
+#define DHCP_OPTION_IDX_DNS_SERVER	8
 #define DHCP_OPTION_IDX_MAX         (DHCP_OPTION_IDX_DNS_SERVER + DNS_MAX_SERVERS)
 
 /** Holds the decoded option values, only valid while in dhcp_recv.
--- a/core/mem.c	Fri Mar 01 15:35:46 2013 +0000
+++ b/core/mem.c	Thu May 30 17:11:58 2013 +0100
@@ -177,8 +177,21 @@
  * If so, make sure the memory at that location is big enough (see below on
  * how that space is calculated). */
 #ifndef LWIP_RAM_HEAP_POINTER
+
+#if defined(TARGET_LPC4088)
+#  if defined (__ICCARM__)
+#     define ETHMEM_SECTION
+#  elif defined(TOOLCHAIN_GCC_CR)
+#     define ETHMEM_SECTION __attribute__((section(".data.$RamPeriph32")))
+#  else
+#     define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
+#  endif
+#else
+#   define ETHMEM_SECTION __attribute((section("AHBSRAM0")))
+#endif
+
 /** the heap. we need one struct mem at the end and some room for alignment */
-u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT]__attribute((section("AHBSRAM0")));
+u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT] ETHMEM_SECTION;
 #define LWIP_RAM_HEAP_POINTER ram_heap
 #endif /* LWIP_RAM_HEAP_POINTER */
 
--- a/core/memp.c	Fri Mar 01 15:35:46 2013 +0000
+++ b/core/memp.c	Thu May 30 17:11:58 2013 +0100
@@ -166,11 +166,17 @@
 
 #else /* MEMP_SEPARATE_POOLS */
 
+#if defined(TARGET_LPC1768)
+#  define ETHMEM_SECTION __attribute((section("AHBSRAM1")))
+#elif defined(TARGET_LPC4088)
+#  define ETHMEM_SECTION 
+#endif
+
 /** This is the actual memory used by the pools (all pools in one big block). */
 static u8_t memp_memory[MEM_ALIGNMENT - 1 
 #define LWIP_MEMPOOL(name,num,size,desc) + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) )
 #include "lwip/memp_std.h"
-] __attribute((section("AHBSRAM1")));
+] ETHMEM_SECTION;
 
 #endif /* MEMP_SEPARATE_POOLS */
 
--- a/netif/ppp/pap.c	Fri Mar 01 15:35:46 2013 +0000
+++ b/netif/ppp/pap.c	Thu May 30 17:11:58 2013 +0100
@@ -218,7 +218,7 @@
         u->us_unit, u->us_timeouttime, u->us_clientstate));
 
   if (u->us_clientstate != UPAPCS_AUTHREQ) {
-    UPAPDEBUG(LOG_INFO, ("upap_timeout: not in AUTHREQ state!\n"));
+	UPAPDEBUG(LOG_INFO, ("upap_timeout: not in AUTHREQ state!\n"));
     return;
   }