From dfd3df73bf7c16aaa6656221301431aa9bf0dd59 Mon Sep 17 00:00:00 2001 From: rtel Date: Tue, 10 Jun 2014 16:29:32 +0000 Subject: [PATCH] Remove some of the lwip asserts to allow use with 64-bit alignment. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2256 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h | 2 ++ FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/src/core/tcp_out.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h index 3fc373998..f9eae84db 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/ports/win32/include/arch/sys_arch.h @@ -46,6 +46,8 @@ typedef SemaphoreHandle_t sys_mutex_t; typedef QueueHandle_t sys_mbox_t; typedef TaskHandle_t sys_thread_t; +typedef unsigned long sys_prot_t; + #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) #define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) diff --git a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/src/core/tcp_out.c b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/src/core/tcp_out.c index 86e091953..1b8308d4f 100644 --- a/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/src/core/tcp_out.c +++ b/FreeRTOS/Demo/Common/ethernet/lwip-1.4.0/src/core/tcp_out.c @@ -768,7 +768,7 @@ tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) TCP_STATS_INC(tcp.memerr); return ERR_MEM; } - LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0); +//_RB_ Triggers with MEM_ALIGNMENT is 64 LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0); LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, @@ -1063,7 +1063,7 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb) /* Add any requested options. NB MSS option is only set on SYN packets, so ignore it here */ - LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0); +//_RB_ LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % MEM_ALIGNMENT) == 0); opts = (u32_t *)(void *)(seg->tcphdr + 1); if (seg->flags & TF_SEG_OPTS_MSS) { TCP_BUILD_MSS_OPTION(*opts); -- 2.39.5