updated picoTCP to 1.4.0, lowered build optimization levels to -O2, improved selftest

This commit is contained in:
Joseph Henry
2017-06-05 14:26:06 -07:00
parent 47a80e8954
commit 19839eeac9
367 changed files with 107850 additions and 3813 deletions

View File

@@ -1,12 +1,13 @@
/*********************************************************************
PicoTCP. Copyright (c) 2012-2015 Altran Intelligent Systems. Some rights reserved.
See LICENSE and COPYING for usage.
PicoTCP. Copyright (c) 2012-2017 Altran Intelligent Systems. Some rights reserved.
See COPYING, LICENSE.GPLv2 and LICENSE.GPLv3 for usage.
*********************************************************************/
#include "pico_defines.h"
#ifndef INCLUDE_PICO_CONFIG
#define INCLUDE_PICO_CONFIG
#ifndef __KERNEL__
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -18,6 +19,7 @@
# define PACKED_STRUCT_DEF __packed struct
# define PEDANTIC_STRUCT_DEF __packed struct
# define PACKED_UNION_DEF __packed union
# define PACKED __packed
# define WEAK
#elif defined __WATCOMC__
# define PACKED_STRUCT_DEF _Packed struct
@@ -28,6 +30,7 @@
# define PACKED_STRUCT_DEF struct __attribute__((packed))
# define PEDANTIC_STRUCT_DEF struct
# define PACKED_UNION_DEF union /* Sane compilers do not require packed unions */
# define PACKED __attribute__((packed))
# define WEAK __attribute__((weak))
# ifdef __GNUC__
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
@@ -163,7 +166,6 @@ static inline uint64_t long_long_be(uint64_t le)
# endif /* BYTESWAP_GCC */
#endif
/* Mockables */
#if defined UNIT_TEST
# define MOCKABLE __attribute__((weak))
@@ -184,7 +186,6 @@ static inline uint64_t long_long_be(uint64_t le)
#define PICO_MAX_SLAB_SIZE 1600
#define PICO_MEM_MINIMUM_OBJECT_SIZE 4
/*** *** *** *** *** *** ***
*** PLATFORM SPECIFIC ***
*** *** *** *** *** *** ***/
@@ -196,8 +197,14 @@ static inline uint64_t long_long_be(uint64_t le)
# include "arch/pico_cortex_m.h"
#elif defined CORTEX_M3
# include "arch/pico_cortex_m.h"
#elif defined CORTEX_M0
# include "arch/pico_cortex_m.h"
#elif defined DOS_WATCOM
# include "arch/pico_dos.h"
#elif defined PIC24
# include "arch/pico_pic24.h"
#elif defined PIC32
# include "arch/pico_pic32.h"
#elif defined MSP430
# include "arch/pico_msp430.h"
#elif defined MBED_TEST
@@ -208,6 +215,8 @@ static inline uint64_t long_long_be(uint64_t le)
# include "arch/pico_arm9.h"
#elif defined ESP8266
# include "arch/pico_esp8266.h"
#elif defined ATSAMD21J18
# include "arch/pico_atsamd21j18.h"
#elif defined MT7681
# include "arch/pico_generic_gcc.h"
#elif defined FAULTY