Free (GPLv2) TCP/IP stack developed by TASS Belgium
Dependents: lpc1768-picotcp-demo ZeroMQ_PicoTCP_Publisher_demo TCPSocket_HelloWorld_PicoTCP Pico_TCP_UDP_Test ... more
PicoTCP. Copyright (c) 2013 TASS Belgium NV.
Released under the GNU General Public License, version 2.
Different licensing models may exist, at the sole discretion of the Copyright holders.
Official homepage: http://www.picotcp.com
Bug tracker: https://github.com/tass-belgium/picotcp/issues
Development steps:
initial integration with mbed RTOSgeneric mbed Ethernet driverhigh performance NXP LPC1768 specific Ethernet driverMulti-threading support for mbed RTOSBerkeley sockets and integration with the New Socket APIFork of the apps running on top of the New Socket APIScheduling optimizations- Debugging/benchmarking/testing
Demo application (measuring TCP sender performance):
Import programlpc1768-picotcp-demo
A PicoTCP demo app testing the ethernet throughput on the lpc1768 mbed board.
Revision 23:884f327c3647, committed 2013-06-10
- Comitter:
- daniele
- Date:
- Mon Jun 10 08:01:01 2013 +0000
- Parent:
- 22:6d0d7ab4aa6d
- Child:
- 24:8bff2b51ea3b
- Commit message:
- Fixed bug in select function
Changed in this revision
--- a/Socket/bsd/proxy_endpoint.cpp Sun Jun 09 16:26:33 2013 +0000 +++ b/Socket/bsd/proxy_endpoint.cpp Mon Jun 10 08:01:01 2013 +0000 @@ -157,8 +157,8 @@ ep->pending = TOK_POLL; ep->timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; ep->events = PICO_SOCK_EV_ERR; - ep->events = PICO_SOCK_EV_FIN; - ep->events = PICO_SOCK_EV_CLOSE; + ep->events |= PICO_SOCK_EV_FIN; + ep->events |= PICO_SOCK_EV_CLOSE; ep->events |= PICO_SOCK_EV_CONN; if (read) { ep->events |= PICO_SOCK_EV_RD;
--- a/Socket/bsd/stack_endpoint.cpp Sun Jun 09 16:26:33 2013 +0000 +++ b/Socket/bsd/stack_endpoint.cpp Mon Jun 10 08:01:01 2013 +0000 @@ -435,21 +435,19 @@ (void)arg; int ret = 0; while(1) { + ret = stack_parse_requests(); pico_stack_tick(); - Thread::wait(1); - ret = stack_parse_requests(); - if (ret > 0) - pico_stack_tick(); - else - Thread::wait(1); + Thread::wait(0); } } void picotcp_start(void) { + Ticker *picotcpTicker = new Ticker(); if (serverThread == NULL) { printf (" *** PicoTCP initialized *** \n"); serverThread = new Thread(pico_wrapper_loop); serverThread->set_priority(osPriorityIdle); + //picotcpTicker->attach(&pico_stack_tick, 0.001); } }
--- a/include/pico_socket.h Sun Jun 09 16:26:33 2013 +0000 +++ b/include/pico_socket.h Mon Jun 10 08:01:01 2013 +0000 @@ -11,7 +11,7 @@ #include "pico_protocol.h" //#define PICO_DEFAULT_SOCKETQ (128 * 1024) -#define PICO_DEFAULT_SOCKETQ (16 * 1024) +#define PICO_DEFAULT_SOCKETQ (8 * 1024) #define PICO_SHUT_RD 1
--- a/stack/pico_stack.c Sun Jun 09 16:26:33 2013 +0000 +++ b/stack/pico_stack.c Mon Jun 10 08:01:01 2013 +0000 @@ -488,7 +488,7 @@ #define PROTO_DEF_SCORE 32 #define PROTO_MIN_SCORE 32 #define PROTO_MAX_SCORE 128 -#define PROTO_LAT_IND 3 /* latecy indication 0-3 (lower is better latency performance), x1, x2, x4, x8 */ +#define PROTO_LAT_IND 1 /* latecy indication 0-3 (lower is better latency performance), x1, x2, x4, x8 */ #define PROTO_MAX_LOOP (PROTO_MAX_SCORE<<PROTO_LAT_IND) /* max global loop score, so per tick */ static int calc_score(int *score, int *index, int avg[][PROTO_DEF_AVG_NR], int *ret)