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 RTOS
  • generic mbed Ethernet driver
  • high performance NXP LPC1768 specific Ethernet driver
  • Multi-threading support for mbed RTOS
  • Berkeley sockets and integration with the New Socket API
  • Fork of the apps running on top of the New Socket API
  • Scheduling 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.

Committer:
tass
Date:
Fri Oct 25 12:47:19 2013 +0000
Revision:
108:1377967f703e
Parent:
90:478be2fd92ac
Child:
113:f2f9b678d3fe
Fixed stack measurement issue

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tass 6:55b47464d5bc 1 #include <mbed.h>
tass 6:55b47464d5bc 2 #include <rtos.h>
tass 6:55b47464d5bc 3
tass 6:55b47464d5bc 4 extern "C" {
tass 89:49ca05d9a19e 5 #include "pico_config.h"
tass 6:55b47464d5bc 6 void *pico_mutex_init(void)
tass 6:55b47464d5bc 7 {
tass 6:55b47464d5bc 8 return new Mutex();
tass 6:55b47464d5bc 9 }
tass 6:55b47464d5bc 10
tass 6:55b47464d5bc 11 void pico_mutex_lock(void *_m)
tass 6:55b47464d5bc 12 {
tass 6:55b47464d5bc 13 Mutex *m = (Mutex *)_m;
tass 6:55b47464d5bc 14 m->lock();
tass 6:55b47464d5bc 15 }
tass 6:55b47464d5bc 16
tass 6:55b47464d5bc 17 void pico_mutex_unlock(void *_m)
tass 6:55b47464d5bc 18 {
tass 6:55b47464d5bc 19 Mutex *m = (Mutex *)_m;
tass 6:55b47464d5bc 20 m->unlock();
tass 6:55b47464d5bc 21 }
tass 89:49ca05d9a19e 22
tass 89:49ca05d9a19e 23
tass 89:49ca05d9a19e 24 #ifdef PICO_MEASURE_STACK
tass 89:49ca05d9a19e 25 int freeStack = 0;
tass 89:49ca05d9a19e 26 void stack_fill_pattern(void * ptr)
tass 89:49ca05d9a19e 27 {
tass 89:49ca05d9a19e 28 int * movingPtr = (int *)ptr;
tass 89:49ca05d9a19e 29 int * finalPtr = movingPtr - STACK_TOTAL_WORDS;
tass 108:1377967f703e 30 while(movingPtr >= finalPtr)
tass 89:49ca05d9a19e 31 {
tass 89:49ca05d9a19e 32 *movingPtr = STACK_PATTERN;
tass 89:49ca05d9a19e 33 movingPtr--;
tass 89:49ca05d9a19e 34 }
tass 6:55b47464d5bc 35 }
tass 89:49ca05d9a19e 36
tass 89:49ca05d9a19e 37 void stack_count_free_words(void *ptr)
tass 89:49ca05d9a19e 38 {
tass 89:49ca05d9a19e 39 int * movingPtr = (int *)ptr;
tass 108:1377967f703e 40 int * finalPtr = movingPtr - STACK_TOTAL_WORDS;
tass 89:49ca05d9a19e 41 freeStack = 0;
tass 89:49ca05d9a19e 42
tass 89:49ca05d9a19e 43 while(finalPtr != movingPtr)
tass 89:49ca05d9a19e 44 {
tass 89:49ca05d9a19e 45 if(*finalPtr != STACK_PATTERN)
tass 89:49ca05d9a19e 46 break;
tass 89:49ca05d9a19e 47 freeStack++;
tass 89:49ca05d9a19e 48 finalPtr++;
tass 89:49ca05d9a19e 49 }
tass 89:49ca05d9a19e 50 }
tass 89:49ca05d9a19e 51
tass 89:49ca05d9a19e 52 int stack_get_free_words(void)
tass 89:49ca05d9a19e 53 {
tass 89:49ca05d9a19e 54 return freeStack;
tass 89:49ca05d9a19e 55 }
tass 89:49ca05d9a19e 56
tass 89:49ca05d9a19e 57 #endif
tass 89:49ca05d9a19e 58
tass 89:49ca05d9a19e 59 }