mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 11:42:57 -04:00
Update FreeRTOS+TCP to latest version V4.3.1 (#1305)
Update FreeRTOS+TCP to latest version V4.3.1
This commit is contained in:
parent
93ba585fb9
commit
a3c047d22f
8 changed files with 61 additions and 31 deletions
|
|
@ -168,22 +168,19 @@ extern void vAssertCalled( const char * const pcFileName,
|
|||
* http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Echo_Clients.html
|
||||
* http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/UDP_Echo_Clients.html */
|
||||
|
||||
#define configECHO_SERVER_ADDR0 127
|
||||
#define configECHO_SERVER_ADDR1 0
|
||||
#define configECHO_SERVER_ADDR2 0
|
||||
#define configECHO_SERVER_ADDR3 1
|
||||
#define configECHO_SERVER_ADDR "172.31.69.236"
|
||||
|
||||
/* Default MAC address configuration. The demo creates a virtual network
|
||||
* connection that uses this MAC address by accessing the raw Ethernet/WiFi data
|
||||
* to and from a real network connection on the host PC. See the
|
||||
* configNETWORK_INTERFACE_TO_USE definition above for information on how to
|
||||
* configure the real network connection to use. */
|
||||
#define configMAC_ADDR0 0x00
|
||||
#define configMAC_ADDR1 0x11
|
||||
#define configMAC_ADDR2 0x22
|
||||
#define configMAC_ADDR3 0x33
|
||||
#define configMAC_ADDR4 0x44
|
||||
#define configMAC_ADDR5 0x41
|
||||
#define configMAC_ADDR0 0x00
|
||||
#define configMAC_ADDR1 0x11
|
||||
#define configMAC_ADDR2 0x22
|
||||
#define configMAC_ADDR3 0x33
|
||||
#define configMAC_ADDR4 0x44
|
||||
#define configMAC_ADDR5 0x41
|
||||
|
||||
/* Default IP address configuration. Used in ipconfigUSE_DNS is set to 0, or
|
||||
* ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@
|
|||
#ifndef FREERTOS_IP_CONFIG_H
|
||||
#define FREERTOS_IP_CONFIG_H
|
||||
|
||||
#ifdef HEAP3
|
||||
#define xPortGetMinimumEverFreeHeapSize( x ) 0
|
||||
#define xPortGetFreeHeapSize() 0
|
||||
#endif
|
||||
|
||||
/* Prototype for the function used to print out. In this case it prints to the
|
||||
* console before the network is connected then a UDP port after the network has
|
||||
* connected. */
|
||||
|
|
@ -67,7 +72,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
|
|||
* FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1
|
||||
* then FreeRTOS_printf should be set to the function used to print out the
|
||||
* messages. */
|
||||
#define ipconfigHAS_PRINTF 0
|
||||
#define ipconfigHAS_PRINTF 1
|
||||
#if ( ipconfigHAS_PRINTF == 1 )
|
||||
#define FreeRTOS_printf( X ) vLoggingPrintf X
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ LDFLAGS += $(shell pkg-config --libs slirp)
|
|||
|
||||
CPPFLAGS = $(INCLUDE_DIRS) -DBUILD_DIR=\"$(BUILD_DIR_ABS)\"
|
||||
|
||||
DEFINES := -DHEAP3
|
||||
CPPFLAGS += $(DEFINES)
|
||||
|
||||
ifndef TRACE_ON_ENTER
|
||||
TRACE_ON_ENTER = 1
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -158,17 +158,11 @@
|
|||
|
||||
#if defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 )
|
||||
{
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0,
|
||||
configECHO_SERVER_ADDR1,
|
||||
configECHO_SERVER_ADDR2,
|
||||
configECHO_SERVER_ADDR3 );
|
||||
xEchoServerAddress.sin_address.ulIP_IPv4 = FreeRTOS_inet_addr( configECHO_SERVER_ADDR );
|
||||
}
|
||||
#else
|
||||
{
|
||||
xEchoServerAddress.sin_addr = FreeRTOS_inet_addr_quick( configECHO_SERVER_ADDR0,
|
||||
configECHO_SERVER_ADDR1,
|
||||
configECHO_SERVER_ADDR2,
|
||||
configECHO_SERVER_ADDR3 );
|
||||
xEchoServerAddress.sin_addr = FreeRTOS_inet_addr( configECHO_SERVER_ADDR );
|
||||
}
|
||||
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
|
||||
|
||||
|
|
@ -189,8 +183,8 @@
|
|||
FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_WIN_PROPERTIES, ( void * ) &xWinProps, sizeof( xWinProps ) );
|
||||
|
||||
/* Connect to the echo server. */
|
||||
printf( "\nConnecting to echo server %d.%d.%d.%d:%d....\n",
|
||||
configECHO_SERVER_ADDR0, configECHO_SERVER_ADDR1, configECHO_SERVER_ADDR2, configECHO_SERVER_ADDR3, echoECHO_PORT );
|
||||
printf( "\nConnecting to echo server %s:%d....\n",
|
||||
configECHO_SERVER_ADDR, echoECHO_PORT );
|
||||
|
||||
ret = FreeRTOS_connect( xSocket, &xEchoServerAddress, sizeof( xEchoServerAddress ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ void main_tcp_echo_client_tasks( void )
|
|||
}
|
||||
else
|
||||
{
|
||||
FreeRTOS_printf( "Application idle hook network down\n" );
|
||||
FreeRTOS_printf( ( "Application idle hook network down\n" ) );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue