[lwip] implement RT_USING_ASM_MEMCPY

This commit is contained in:
Meco Man 2021-08-03 10:27:48 +08:00
parent 3cb13b4523
commit 4cac267927
4 changed files with 34 additions and 6 deletions

View File

@ -222,6 +222,13 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
#else
#define MEMCPY(dst,src,len) memcpy(dst,src,len)
#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#define MEM_ALIGNMENT 4
#define MEM_LIBC_MALLOC 1

View File

@ -230,14 +230,21 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
#else
#define MEMCPY(dst,src,len) memcpy(dst,src,len)
#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#ifdef RT_LWIP_MEM_ALIGNMENT
#define MEM_ALIGNMENT RT_LWIP_MEM_ALIGNMENT
#else
#define MEM_ALIGNMENT 4
#endif
#define MEMP_OVERFLOW_CHECK 1 ////
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
#define MEMP_OVERFLOW_CHECK 1
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1

View File

@ -230,14 +230,21 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
#else
#define MEMCPY(dst,src,len) memcpy(dst,src,len)
#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#ifdef RT_LWIP_MEM_ALIGNMENT
#define MEM_ALIGNMENT RT_LWIP_MEM_ALIGNMENT
#else
#define MEM_ALIGNMENT 4
#endif
#define MEMP_OVERFLOW_CHECK 1 ////
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
#define MEMP_OVERFLOW_CHECK 1
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1

View File

@ -242,9 +242,16 @@
#endif
/* ---------- Memory options ---------- */
#ifdef RT_USING_ASM_MEMCPY
#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
#else
#define MEMCPY(dst,src,len) memcpy(dst,src,len)
#endif /* RT_USING_ASM_MEMCPY */
#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
#define MEM_ALIGNMENT 4
#define MEMP_OVERFLOW_CHECK 1 ////
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
#define MEMP_OVERFLOW_CHECK 1
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1