lwip operating system abstraction layer implementation based on CMSIS-RTOS

Dependents:   LwIPNetworking NetServicesMin EthernetInterface EthernetInterface_RSF ... more

Revision:
10:09b0951b1899
Parent:
9:d7ad3f3ee934
Child:
15:7d4b24b58e04
--- a/arch/cc.h	Mon Aug 19 18:38:06 2013 +0300
+++ b/arch/cc.h	Tue Sep 10 15:14:42 2013 +0300
@@ -82,8 +82,21 @@
     #define ALIGNED(n)  __attribute__((aligned (n)))
 #endif 
 
-/* Used with IP headers only */
-#define LWIP_CHKSUM_ALGORITHM 1
+/* Provide Thumb-2 routines for GCC to improve performance */
+#if defined(TOOLCHAIN_GCC) && defined(__thumb2__)
+    #define MEMCPY(dst,src,len)     thumb2_memcpy(dst,src,len)
+    #define LWIP_CHKSUM             thumb2_checksum
+    /* Set algorithm to 0 so that unused lwip_standard_chksum function
+       doesn't generate compiler warning */
+    #define LWIP_CHKSUM_ALGORITHM   0
+
+    void* thumb2_memcpy(void* pDest, const void* pSource, size_t length);
+    u16_t thumb2_checksum(void* pData, int length);
+#else
+    /* Used with IP headers only */
+    #define LWIP_CHKSUM_ALGORITHM   1
+#endif
+
 
 #ifdef LWIP_DEBUG