diff --git a/arch/platform/cooja/contiki-conf.h b/arch/platform/cooja/contiki-conf.h index b15ea4636..970eddbb8 100644 --- a/arch/platform/cooja/contiki-conf.h +++ b/arch/platform/cooja/contiki-conf.h @@ -33,6 +33,11 @@ #ifndef CONTIKI_CONF_H_ #define CONTIKI_CONF_H_ +/* include the project config */ +#ifdef PROJECT_CONF_PATH +#include PROJECT_CONF_PATH +#endif /* PROJECT_CONF_PATH */ + #ifdef INCLUDE_SUBPLATFORM_CONF #include "subplatform-conf.h" #endif /* INCLUDE_SUBPLATFORM_CONF */ @@ -137,10 +142,4 @@ typedef uint64_t rtimer_clock_t; #define RF_CHANNEL 26 #define NETSTACK_RADIO_MAX_PAYLOAD_LEN 125 -/* include the project config */ -#ifdef PROJECT_CONF_PATH -#include PROJECT_CONF_PATH -#endif /* PROJECT_CONF_PATH */ - - #endif /* CONTIKI_CONF_H_ */ diff --git a/arch/platform/jn516x/contiki-conf.h b/arch/platform/jn516x/contiki-conf.h index f464d8773..620e55674 100644 --- a/arch/platform/jn516x/contiki-conf.h +++ b/arch/platform/jn516x/contiki-conf.h @@ -33,6 +33,11 @@ #ifndef CONTIKI_CONF_H_ #define CONTIKI_CONF_H_ +/* include the project config */ +#ifdef PROJECT_CONF_PATH +#include PROJECT_CONF_PATH +#endif /* PROJECT_CONF_PATH */ + #ifdef PLATFORM_CONF_H #include PLATFORM_CONF_H #else @@ -49,9 +54,4 @@ #define CCM_STAR_CONF ccm_star_driver_jn516x #endif /* CCM_STAR_CONF */ -/* include the project config */ -#ifdef PROJECT_CONF_PATH -#include PROJECT_CONF_PATH -#endif /* PROJECT_CONF_PATH */ - #endif /* CONTIKI_CONF_H_ */ diff --git a/arch/platform/jn516x/dev/exceptions.c b/arch/platform/jn516x/dev/exceptions.c index 2991de639..172118a97 100644 --- a/arch/platform/jn516x/dev/exceptions.c +++ b/arch/platform/jn516x/dev/exceptions.c @@ -36,6 +36,7 @@ #include #include #include +#include "contiki.h" #include "exceptions.h" #ifndef EXCEPTION_STALLS_SYSTEM diff --git a/arch/platform/native/contiki-conf.h b/arch/platform/native/contiki-conf.h index f30e19f9d..2e9526cb2 100644 --- a/arch/platform/native/contiki-conf.h +++ b/arch/platform/native/contiki-conf.h @@ -33,6 +33,11 @@ #ifndef CONTIKI_CONF_H_ #define CONTIKI_CONF_H_ +/* include the project config */ +#ifdef PROJECT_CONF_PATH +#include PROJECT_CONF_PATH +#endif /* PROJECT_CONF_PATH */ + #include #ifndef WIN32_LEAN_AND_MEAN #include @@ -94,9 +99,4 @@ typedef unsigned long clock_time_t; /* Not part of C99 but actually present */ int strcasecmp(const char*, const char*); -/* include the project config */ -#ifdef PROJECT_CONF_PATH -#include PROJECT_CONF_PATH -#endif /* PROJECT_CONF_PATH */ - #endif /* CONTIKI_CONF_H_ */ diff --git a/arch/platform/nrf52dk/contiki-conf.h b/arch/platform/nrf52dk/contiki-conf.h index f52bf48d2..f8d7f8b1d 100644 --- a/arch/platform/nrf52dk/contiki-conf.h +++ b/arch/platform/nrf52dk/contiki-conf.h @@ -61,7 +61,11 @@ /* 6LoWPAN */ #define SICSLOWPAN_CONF_MAC_MAX_PAYLOAD 1280 + +#ifndef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 /**< We don't use 6LoWPAN fragmentation as IPSP takes care of that for us.*/ +#endif + #define SICSLOWPAN_FRAMER_HDRLEN 0 /**< Use fixed header len rather than framer.length() function */ /* Packet buffer */ diff --git a/arch/platform/sky/contiki-conf.h b/arch/platform/sky/contiki-conf.h index 6bce536ec..52fc596a8 100644 --- a/arch/platform/sky/contiki-conf.h +++ b/arch/platform/sky/contiki-conf.h @@ -3,6 +3,11 @@ #ifndef CONTIKI_CONF_H #define CONTIKI_CONF_H +/* include the project config */ +#ifdef PROJECT_CONF_PATH +#include PROJECT_CONF_PATH +#endif /* PROJECT_CONF_PATH */ + #ifdef PLATFORM_CONF_H #include PLATFORM_CONF_H #else @@ -33,9 +38,4 @@ #define AES_128_CONF cc2420_aes_128_driver #endif /* AES_128_CONF */ -/* include the project config */ -#ifdef PROJECT_CONF_PATH -#include PROJECT_CONF_PATH -#endif /* PROJECT_CONF_PATH */ - #endif /* CONTIKI_CONF_H */ diff --git a/examples/6tisch/6p-packet/project-conf.h b/examples/6tisch/6p-packet/project-conf.h index 70ce6c7ad..0381217c6 100644 --- a/examples/6tisch/6p-packet/project-conf.h +++ b/examples/6tisch/6p-packet/project-conf.h @@ -32,7 +32,6 @@ #define _PROJECT_CONF_H_ #define CONTIKI_WITH_RPL 0 -#undef UIP_CONF_IPV6_RPL #define UIP_CONF_IPV6_RPL 0 #define UIP_CONF_ND6_SEND_RA 0 diff --git a/examples/6tisch/etsi-plugtest-2017/project-conf.h b/examples/6tisch/etsi-plugtest-2017/project-conf.h index d7761bf90..894a49aba 100644 --- a/examples/6tisch/etsi-plugtest-2017/project-conf.h +++ b/examples/6tisch/etsi-plugtest-2017/project-conf.h @@ -59,21 +59,17 @@ /*******************************************************/ /* IEEE802.15.4 PANID */ -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0x81a5 /* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 /* 6TiSCH minimal schedule length. * Larger values result in less frequent active slots: reduces capacity and saves energy. */ -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 11 #if WITH_SECURITY /* Enable security */ -#undef LLSEC802154_CONF_ENABLED #define LLSEC802154_CONF_ENABLED 1 #define LLSEC802154_CONF_USES_EXPLICIT_KEYS 0 #define LLSEC802154_CONF_USES_FRAME_COUNTER 0 @@ -89,19 +85,14 @@ #define TSCH_CONF_MAC_MAX_FRAME_RETRIES 3 -#undef TSCH_CONF_DEFAULT_HOPPING_SEQUENCE #define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE (uint8_t[]){ 20 } //#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_16_16 -#undef TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR #define TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR 1 -#undef TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK #define TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK 1 -#undef TSCH_CONF_EB_PERIOD #define TSCH_CONF_EB_PERIOD (1 * CLOCK_SECOND) -#undef TSCH_CONF_MAX_EB_PERIOD #define TSCH_CONF_MAX_EB_PERIOD (1 * CLOCK_SECOND) /*******************************************************/ @@ -126,14 +117,11 @@ /* Needed for CC2538 platforms only */ /* For TSCH we have to use the more accurate crystal oscillator * by default the RC oscillator is activated */ -#undef SYS_CTRL_CONF_OSC32K_USE_XTAL #define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 #define USB_SERIAL_CONF_ENABLE 1 /* USB serial takes space, free more space elsewhere */ -#undef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 -#undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 160 #if CONTIKI_TARGET_SRF06_CC26XX @@ -146,27 +134,22 @@ /* Needed for cc2420 platforms only */ /* Disable DCO calibration (uses timerB) */ -#undef DCOSYNCH_CONF_ENABLED #define DCOSYNCH_CONF_ENABLED 0 /* Enable SFD timestamps (uses timerB) */ -#undef CC2420_CONF_SFD_TIMESTAMPS #define CC2420_CONF_SFD_TIMESTAMPS 1 /*******************************************************/ /******************* Configure 6LoWPAN/IPv6 ************/ /*******************************************************/ -#undef UIP_CONF_IPV6_CHECKS #define UIP_CONF_IPV6_CHECKS 1 -#undef SICSLOWPAN_CONF_COMPRESSION #define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_6LORH /*******************************************************/ /********* Enable RPL non-storing mode *****************/ /*******************************************************/ -#undef RPL_CONF_MOP #define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/ /*******************************************************/ @@ -183,7 +166,6 @@ #define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG #define TSCH_LOG_CONF_PER_SLOT 1 -#undef TCPIP_CONF_ANNOTATE_TRANSMISSIONS #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 0 #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/http-socket/Makefile b/examples/http-socket/Makefile index a0d2534e3..e63dacd84 100644 --- a/examples/http-socket/Makefile +++ b/examples/http-socket/Makefile @@ -3,5 +3,4 @@ CONTIKI=../.. MODULES += os/net/app-layer/http-socket CONTIKI_WITH_RPL_LITE = 0 -CFLAGS += -DUIP_CONF_TCP=1 include $(CONTIKI)/Makefile.include diff --git a/examples/http-socket/project-conf.h b/examples/http-socket/project-conf.h new file mode 100644 index 000000000..38f34be86 --- /dev/null +++ b/examples/http-socket/project-conf.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017, George Oikonomou - http://www.spd.gr + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/*---------------------------------------------------------------------------*/ +#ifndef PROJECT_CONF_H_ +#define PROJECT_CONF_H_ +/*---------------------------------------------------------------------------*/ +#define UIP_CONF_TCP 1 +/*---------------------------------------------------------------------------*/ +#endif /* PROJECT_CONF_H_ */ diff --git a/examples/ip64-router/Makefile b/examples/ip64-router/Makefile index 65bd6da74..a77652cfa 100644 --- a/examples/ip64-router/Makefile +++ b/examples/ip64-router/Makefile @@ -1,5 +1,4 @@ all: ip64-router CONTIKI=../.. -CFLAGS += -DUIP_CONF_TCP=1 include $(CONTIKI)/Makefile.include diff --git a/examples/ip64-router/project-conf.h b/examples/ip64-router/project-conf.h new file mode 100644 index 000000000..38f34be86 --- /dev/null +++ b/examples/ip64-router/project-conf.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2017, George Oikonomou - http://www.spd.gr + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/*---------------------------------------------------------------------------*/ +#ifndef PROJECT_CONF_H_ +#define PROJECT_CONF_H_ +/*---------------------------------------------------------------------------*/ +#define UIP_CONF_TCP 1 +/*---------------------------------------------------------------------------*/ +#endif /* PROJECT_CONF_H_ */ diff --git a/examples/ipso-objects/project-conf.h b/examples/ipso-objects/project-conf.h index 4efe5c32f..075cd7444 100644 --- a/examples/ipso-objects/project-conf.h +++ b/examples/ipso-objects/project-conf.h @@ -43,17 +43,13 @@ #define IPSO_TEMPERATURE example_ipso_temperature /* Increase rpl-border-router IP-buffer when using more than 64. */ -#undef REST_MAX_CHUNK_SIZE #define REST_MAX_CHUNK_SIZE 64 /* Multiplies with chunk size, be aware of memory constraints. */ -#undef COAP_MAX_OPEN_TRANSACTIONS #define COAP_MAX_OPEN_TRANSACTIONS 4 /* Filtering .well-known/core per query can be disabled to save space. */ -#undef COAP_LINK_FORMAT_FILTERING #define COAP_LINK_FORMAT_FILTERING 0 -#undef COAP_PROXY_OPTION_PROCESSING #define COAP_PROXY_OPTION_PROCESSING 0 /* Enable client-side support for COAP observe */ diff --git a/examples/ipv6/coap-example/README.md b/examples/ipv6/coap-example/README.md index bd884b52f..c0ca817ca 100644 --- a/examples/ipv6/coap-example/README.md +++ b/examples/ipv6/coap-example/README.md @@ -19,7 +19,6 @@ PRELIMINARIES - Make sure rpl-border-router has the same stack and fits into mote memory: You can disable RDC in border-router project-conf.h (not really required as BR keeps radio turned on). - #undef NETSTACK_CONF_RDC #define NETSTACK_CONF_RDC nullrdc_driver - Alternatively, you can use the native-border-router together with the slip-radio. - For convenience, define the Cooja addresses in /etc/hosts diff --git a/examples/ipv6/coap-example/project-conf.h b/examples/ipv6/coap-example/project-conf.h index d62d3952b..d8a3b1122 100644 --- a/examples/ipv6/coap-example/project-conf.h +++ b/examples/ipv6/coap-example/project-conf.h @@ -41,47 +41,36 @@ /* Custom channel and PAN ID configuration for your project. */ /* - #undef RF_CHANNEL #define RF_CHANNEL 26 - - #undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xABCD */ /* IP buffer size must match all other hops, in particular the border router. */ /* - #undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 256 */ /* Increase rpl-border-router IP-buffer when using more than 64. */ -#undef REST_MAX_CHUNK_SIZE #define REST_MAX_CHUNK_SIZE 48 /* Estimate your header size, especially when using Proxy-Uri. */ /* - #undef COAP_MAX_HEADER_SIZE #define COAP_MAX_HEADER_SIZE 70 */ /* Multiplies with chunk size, be aware of memory constraints. */ -#undef COAP_MAX_OPEN_TRANSACTIONS #define COAP_MAX_OPEN_TRANSACTIONS 4 /* Must be <= open transactions, default is COAP_MAX_OPEN_TRANSACTIONS-1. */ /* - #undef COAP_MAX_OBSERVERS #define COAP_MAX_OBSERVERS 2 */ /* Filtering .well-known/core per query can be disabled to save space. */ -#undef COAP_LINK_FORMAT_FILTERING #define COAP_LINK_FORMAT_FILTERING 0 -#undef COAP_PROXY_OPTION_PROCESSING #define COAP_PROXY_OPTION_PROCESSING 0 /* Turn off DAO-ACK to make code smaller */ -#undef RPL_CONF_WITH_DAO_ACK #define RPL_CONF_WITH_DAO_ACK 0 /* Enable client-side support for COAP observe */ diff --git a/examples/ipv6/json-ws/project-conf.h b/examples/ipv6/json-ws/project-conf.h index 948724f7e..1135d7dd1 100644 --- a/examples/ipv6/json-ws/project-conf.h +++ b/examples/ipv6/json-ws/project-conf.h @@ -38,13 +38,10 @@ #define JSON_WS_CONF_CALLBACK_PORT 80 #define JSON_WS_CONF_CALLBACK_INTERVAL 120 -#undef WEBSERVER_CONF_INBUF_SIZE #define WEBSERVER_CONF_INBUF_SIZE 200 -#undef WEBSERVER_CONF_OUTBUF_SIZE #define WEBSERVER_CONF_OUTBUF_SIZE (UIP_TCP_MSS + 20 + 80) -#undef WEBSERVER_CONF_CFS_CONNS #define WEBSERVER_CONF_CFS_CONNS 3 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/ipv6/multicast/project-conf.h b/examples/ipv6/multicast/project-conf.h index 198f3f47b..7a59c7d13 100644 --- a/examples/ipv6/multicast/project-conf.h +++ b/examples/ipv6/multicast/project-conf.h @@ -49,13 +49,10 @@ /* For Imin: Use 16 over CSMA, 64 over Contiki MAC */ #define ROLL_TM_CONF_IMIN_1 64 -#undef UIP_MCAST6_ROUTE_CONF_ROUTES #define UIP_MCAST6_ROUTE_CONF_ROUTES 1 /* Code/RAM footprint savings so that things will fit on our device */ -#undef NETSTACK_MAX_ROUTE_ENTRIES #define NETSTACK_MAX_ROUTE_ENTRIES 10 -#undef NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_CONF_MAX_NEIGHBORS 10 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/ipv6/native-border-router/project-conf.h b/examples/ipv6/native-border-router/project-conf.h index 2e97f3acf..c6c9e4f30 100644 --- a/examples/ipv6/native-border-router/project-conf.h +++ b/examples/ipv6/native-border-router/project-conf.h @@ -30,21 +30,17 @@ #ifndef PROJECT_ROUTER_CONF_H_ #define PROJECT_ROUTER_CONF_H_ -#undef UIP_FALLBACK_INTERFACE #define UIP_FALLBACK_INTERFACE rpl_interface /* use a non-default network driver */ -#undef NETSTACK_CONF_NETWORK #define NETSTACK_CONF_NETWORK sicslowpan_driver /* use a non-default MAC driver */ -#undef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC border_router_mac_driver #define SLIP_DEV_CONF_SEND_DELAY (CLOCK_SECOND / 32) -#undef WEBSERVER_CONF_CFS_CONNS #define WEBSERVER_CONF_CFS_CONNS 2 #define SERIALIZE_ATTRIBUTES 1 diff --git a/examples/ipv6/rpl-border-router/Makefile b/examples/ipv6/rpl-border-router/Makefile index 8abb62a10..c8a40f681 100644 --- a/examples/ipv6/rpl-border-router/Makefile +++ b/examples/ipv6/rpl-border-router/Makefile @@ -16,12 +16,10 @@ PROJECT_SOURCEFILES += slip-bridge.c WITH_WEBSERVER=1 ifeq ($(WITH_WEBSERVER),1) -CFLAGS += -DUIP_CONF_TCP=1 CFLAGS += -DWEBSERVER=1 PROJECT_SOURCEFILES += httpd-simple.c else ifneq ($(WITH_WEBSERVER), 0) MODULES += $(WITH_WEBSERVER) -CFLAGS += -DUIP_CONF_TCP=1 CFLAGS += -DWEBSERVER=2 endif diff --git a/examples/ipv6/rpl-border-router/project-conf.h b/examples/ipv6/rpl-border-router/project-conf.h index fda9acd88..63930dd77 100644 --- a/examples/ipv6/rpl-border-router/project-conf.h +++ b/examples/ipv6/rpl-border-router/project-conf.h @@ -39,4 +39,8 @@ #define WEBSERVER_CONF_CFS_CONNS 2 #endif +#if WEBSERVER +#define UIP_CONF_TCP 1 +#endif + #endif /* PROJECT_ROUTER_CONF_H_ */ diff --git a/examples/ipv6/rpl-simple/project-conf.h b/examples/ipv6/rpl-simple/project-conf.h index e20e3c2a1..b5c3c9991 100644 --- a/examples/ipv6/rpl-simple/project-conf.h +++ b/examples/ipv6/rpl-simple/project-conf.h @@ -31,23 +31,16 @@ #define PROJECT_CONF_H_ /* Network size and PAN-ID */ - -#undef NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_CONF_MAX_NEIGHBORS 25 -#undef NETSTACK_MAX_ROUTE_ENTRIES #define NETSTACK_MAX_ROUTE_ENTRIES 25 -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xf123 /* Save some space */ - -#undef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 #if MAC_CONF_WITH_TSCH - /*******************************************************/ /********************* Configure TSCH *********************/ /*******************************************************/ @@ -61,23 +54,18 @@ /*******************************************************/ /******************* Configure TSCH ********************/ /*******************************************************/ +#endif /* MAC_CONF_WITH_TSCH */ /* TSCH per-slot logging */ -#undef TSCH_LOG_CONF_PER_SLOT #define TSCH_LOG_CONF_PER_SLOT 1 /* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 /* 6TiSCH minimal schedule length. * Larger values result in less frequent active slots: reduces capacity and saves energy. */ -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 3 -#undef TSCH_SCHEDULE_CONF_MAX_LINKS #define TSCH_SCHEDULE_CONF_MAX_LINKS 4 -#endif /* MAC_CONF_WITH_TSCH */ - #endif diff --git a/examples/ipv6/rpl-tsch-sixtop/project-conf.h b/examples/ipv6/rpl-tsch-sixtop/project-conf.h index 97a47b9dc..3fa3d548a 100755 --- a/examples/ipv6/rpl-tsch-sixtop/project-conf.h +++ b/examples/ipv6/rpl-tsch-sixtop/project-conf.h @@ -39,12 +39,8 @@ /*******************************************************/ /********* Enable RPL non-storing mode *****************/ /*******************************************************/ - -#undef UIP_CONF_MAX_ROUTES #define UIP_CONF_MAX_ROUTES 0 /* No need for routes */ -#undef RPL_CONF_MOP #define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/ -#undef ORCHESTRA_CONF_RULES #define ORCHESTRA_CONF_RULES { &eb_per_time_source, &unicast_per_neighbor_rpl_ns, &default_common } /* Orchestra in non-storing */ /*******************************************************/ @@ -60,19 +56,15 @@ /* Needed for CC2538 platforms only */ /* For TSCH we have to use the more accurate crystal oscillator * by default the RC oscillator is activated */ -#undef SYS_CTRL_CONF_OSC32K_USE_XTAL #define SYS_CTRL_CONF_OSC32K_USE_XTAL 1 /* Needed for cc2420 platforms only */ /* Disable DCO calibration (uses timerB) */ -#undef DCOSYNCH_CONF_ENABLED #define DCOSYNCH_CONF_ENABLED 0 /* Enable SFD timestamps (uses timerB) */ -#undef CC2420_CONF_SFD_TIMESTAMPS #define CC2420_CONF_SFD_TIMESTAMPS 1 /* Enable Sixtop Implementation */ -#undef TSCH_CONF_WITH_SIXTOP #define TSCH_CONF_WITH_SIXTOP 1 /*******************************************************/ @@ -80,31 +72,24 @@ /*******************************************************/ /* TSCH logging. */ -#undef TSCH_LOG_CONF_PER_SLOT #define TSCH_LOG_CONF_PER_SLOT 1 /* IEEE802.15.4 PANID */ -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xabcd /* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 /* 6TiSCH schedule length */ -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 11 #if WITH_SECURITY /* Enable security */ -#undef LLSEC802154_CONF_ENABLED #define LLSEC802154_CONF_ENABLED 1 /* TSCH uses explicit keys to identify k1 and k2 */ -#undef LLSEC802154_CONF_USES_EXPLICIT_KEYS #define LLSEC802154_CONF_USES_EXPLICIT_KEYS 1 /* TSCH uses the ASN rather than frame counter to construct the Nonce */ -#undef LLSEC802154_CONF_USES_FRAME_COUNTER #define LLSEC802154_CONF_USES_FRAME_COUNTER 0 #endif /* WITH_SECURITY */ @@ -115,29 +100,20 @@ #if CONTIKI_TARGET_Z1 /* Save some space to fit the limited RAM of the z1 */ -#undef UIP_CONF_TCP #define UIP_CONF_TCP 0 -#undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 2 -#undef RPL_NS_CONF_LINK_NUM #define RPL_NS_CONF_LINK_NUM 2 -#undef NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_CONF_MAX_NEIGHBORS 2 -#undef UIP_CONF_ND6_SEND_NA #define UIP_CONF_ND6_SEND_NA 0 -#undef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 #if WITH_SECURITY /* Note: on sky or z1 in cooja, crypto operations are done in S/W and * cannot be accommodated in normal slots. Use 65ms slots instead, and * a very short 6TiSCH minimal schedule length */ -#undef TSCH_CONF_DEFAULT_TIMESLOT_LENGTH #define TSCH_CONF_DEFAULT_TIMESLOT_LENGTH 65000 -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 2 /* Reduce log level to make space for security on z1 */ -#undef TSCH_LOG_CONF_LEVEL #define TSCH_LOG_CONF_LEVEL 0 #endif /* WITH_SECURITY */ diff --git a/examples/ipv6/rpl-tsch/project-conf.h b/examples/ipv6/rpl-tsch/project-conf.h index 39b9f5a55..f3becfc5c 100644 --- a/examples/ipv6/rpl-tsch/project-conf.h +++ b/examples/ipv6/rpl-tsch/project-conf.h @@ -52,9 +52,7 @@ /********* Enable RPL non-storing mode *****************/ /*******************************************************/ -#undef RPL_CONF_MOP #define RPL_CONF_MOP RPL_MOP_NON_STORING /* Mode of operation*/ -#undef ORCHESTRA_CONF_RULES #define ORCHESTRA_CONF_RULES { &eb_per_time_source, &unicast_per_neighbor_rpl_ns, &default_common } /* Orchestra in non-storing */ /*******************************************************/ @@ -73,9 +71,7 @@ #define USB_SERIAL_CONF_ENABLE 1 /* USB serial takes space, free more space elsewhere */ -#undef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 -#undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 160 #endif /* WITH_SHELL */ @@ -85,22 +81,18 @@ /*******************************************************/ /* IEEE802.15.4 PANID */ -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0x81a5 /* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 /* 6TiSCH minimal schedule length. * Larger values result in less frequent active slots: reduces capacity and saves energy. */ -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 3 #if WITH_SECURITY /* Enable security */ -#undef LLSEC802154_CONF_ENABLED #define LLSEC802154_CONF_ENABLED 1 #endif /* WITH_SECURITY */ diff --git a/examples/ipv6/slip-radio/project-conf.h b/examples/ipv6/slip-radio/project-conf.h index c8288f2b6..fc51e55ec 100644 --- a/examples/ipv6/slip-radio/project-conf.h +++ b/examples/ipv6/slip-radio/project-conf.h @@ -30,13 +30,10 @@ #ifndef PROJECT_CONF_H_ #define PROJECT_CONF_H_ -#undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 4 -#undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 140 -#undef UIP_CONF_ROUTER #define UIP_CONF_ROUTER 0 #define CMD_CONF_OUTPUT slip_radio_cmd_output @@ -55,10 +52,8 @@ /* Configuration for the slipradio/network driver. */ #define NETSTACK_CONF_NETWORK slipnet_driver -#undef NETSTACK_CONF_FRAMER #define NETSTACK_CONF_FRAMER no_framer -#undef UART1_CONF_RX_WITH_DMA #define UART1_CONF_RX_WITH_DMA 1 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/platform-specific/jn516x/rpl/border-router/project-conf.h b/examples/platform-specific/jn516x/rpl/border-router/project-conf.h index 2489905a6..2673d895e 100644 --- a/examples/platform-specific/jn516x/rpl/border-router/project-conf.h +++ b/examples/platform-specific/jn516x/rpl/border-router/project-conf.h @@ -40,7 +40,6 @@ #endif /* Needed for slip-bridge */ -#undef SLIP_BRIDGE_CONF_NO_PUTCHAR #define SLIP_BRIDGE_CONF_NO_PUTCHAR 0 #include "../common-conf.h" diff --git a/examples/platform-specific/jn516x/rpl/coap-dongle-node/Makefile b/examples/platform-specific/jn516x/rpl/coap-dongle-node/Makefile index eb183a1cd..1b13ef3e0 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dongle-node/Makefile +++ b/examples/platform-specific/jn516x/rpl/coap-dongle-node/Makefile @@ -11,8 +11,6 @@ MODULES += os/lib/json PROJECTDIRS += .. ../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DUIP_CONF_TCP=0 MODULES += os/net/app-layer/coap include $(CONTIKI)/Makefile.include diff --git a/examples/platform-specific/jn516x/rpl/coap-dongle-node/project-conf.h b/examples/platform-specific/jn516x/rpl/coap-dongle-node/project-conf.h index 4c2ecd648..a46f32f1c 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dongle-node/project-conf.h +++ b/examples/platform-specific/jn516x/rpl/coap-dongle-node/project-conf.h @@ -34,6 +34,8 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ +#define UIP_CONF_TCP 0 + #include "../common-conf.h" #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/rpl/coap-dr1175-node/Makefile b/examples/platform-specific/jn516x/rpl/coap-dr1175-node/Makefile index 3da7690db..9a393ff14 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dr1175-node/Makefile +++ b/examples/platform-specific/jn516x/rpl/coap-dr1175-node/Makefile @@ -11,8 +11,6 @@ MODULES += os/lib/json PROJECTDIRS += .. ../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DUIP_CONF_TCP=0 MODULES += os/net/app-layer/coap include $(CONTIKI)/Makefile.include diff --git a/examples/platform-specific/jn516x/rpl/coap-dr1175-node/project-conf.h b/examples/platform-specific/jn516x/rpl/coap-dr1175-node/project-conf.h index 4c2ecd648..a46f32f1c 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dr1175-node/project-conf.h +++ b/examples/platform-specific/jn516x/rpl/coap-dr1175-node/project-conf.h @@ -34,6 +34,8 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ +#define UIP_CONF_TCP 0 + #include "../common-conf.h" #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/rpl/coap-dr1199-node/Makefile b/examples/platform-specific/jn516x/rpl/coap-dr1199-node/Makefile index 97b61dd9c..32231f636 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dr1199-node/Makefile +++ b/examples/platform-specific/jn516x/rpl/coap-dr1199-node/Makefile @@ -11,8 +11,6 @@ MODULES += os/lib/json PROJECTDIRS += .. ../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DUIP_CONF_TCP=0 MODULES += os/net/app-layer/coap include $(CONTIKI)/Makefile.include diff --git a/examples/platform-specific/jn516x/rpl/coap-dr1199-node/project-conf.h b/examples/platform-specific/jn516x/rpl/coap-dr1199-node/project-conf.h index 4c2ecd648..a46f32f1c 100644 --- a/examples/platform-specific/jn516x/rpl/coap-dr1199-node/project-conf.h +++ b/examples/platform-specific/jn516x/rpl/coap-dr1199-node/project-conf.h @@ -34,6 +34,8 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ +#define UIP_CONF_TCP 0 + #include "../common-conf.h" #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/rpl/common-conf.h b/examples/platform-specific/jn516x/rpl/common-conf.h index ce104a759..fb7b0d51c 100644 --- a/examples/platform-specific/jn516x/rpl/common-conf.h +++ b/examples/platform-specific/jn516x/rpl/common-conf.h @@ -61,22 +61,18 @@ #define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network /* TSCH per-slot logging */ -#undef TSCH_LOG_CONF_PER_SLOT #define TSCH_LOG_CONF_PER_SLOT 1 /* Do not start TSCH at init, wait for NETSTACK_MAC.on() */ -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 /* 6TiSCH minimal schedule length. * Larger values result in less frequent active slots: reduces capacity and saves energy. */ -#undef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH #define TSCH_SCHEDULE_CONF_DEFAULT_LENGTH 3 #if WITH_SECURITY /* Enable security */ -#undef LLSEC802154_CONF_SECURITY_LEVEL #define LLSEC802154_CONF_SECURITY_LEVEL 1 #endif /* WITH_SECURITY */ @@ -103,21 +99,16 @@ /* IEEE802.15.4 PANID and channel */ -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xabcd -#undef MICROMAC_CONF_CHANNEL #define MICROMAC_CONF_CHANNEL 26 /* UART Configuration */ -#undef UART_HW_FLOW_CTRL #define UART_HW_FLOW_CTRL 0 -#undef UART_XONXOFF_FLOW_CTRL #define UART_XONXOFF_FLOW_CTRL 1 -#undef UART_BAUD_RATE #define UART_BAUD_RATE UART_RATE_1000000 #endif /* __COMMON_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/tsch/common-conf-jn516x.h b/examples/platform-specific/jn516x/tsch/common-conf-jn516x.h index 3f33730dc..568fd4b6d 100644 --- a/examples/platform-specific/jn516x/tsch/common-conf-jn516x.h +++ b/examples/platform-specific/jn516x/tsch/common-conf-jn516x.h @@ -36,49 +36,41 @@ /* Shall we restart after exception, or stall? * in production code we should restart, so set this to 0 */ -#undef EXCEPTION_STALLS_SYSTEM #define EXCEPTION_STALLS_SYSTEM 1 /* CoAP */ -#undef COAP_MAX_OPEN_TRANSACTIONS #define COAP_MAX_OPEN_TRANSACTIONS 4 -#undef REST_MAX_CHUNK_SIZE #define REST_MAX_CHUNK_SIZE 256 /* Network config */ -#undef UIP_CONF_BUFFER_SIZE //#define UIP_CONF_BUFFER_SIZE (REST_MAX_CHUNK_SIZE + UIP_LLH_LEN + UIP_IPUDPH_LEN + COAP_MAX_HEADER_SIZE) //#define UIP_CONF_BUFFER_SIZE (REST_MAX_CHUNK_SIZE + 0 + 48 + 70) #define UIP_CONF_BUFFER_SIZE 1280 /* ipv6 required minimum */ /* Queues */ -#undef QUEUEBUF_CONF_NUM +#ifndef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 32 +#endif -#undef TSCH_QUEUE_CONF_NUM_PER_NEIGHBOR #define TSCH_QUEUE_CONF_NUM_PER_NEIGHBOR 32 -#undef TSCH_CONF_DEQUEUED_ARRAY_SIZE #define TSCH_CONF_DEQUEUED_ARRAY_SIZE 32 -#undef TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES #define TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES 8 /* Radio */ -#undef ENABLE_COOJA_DEBUG #define ENABLE_COOJA_DEBUG 0 /* max 3, min 0 */ -#undef UART_HW_FLOW_CTRL #define UART_HW_FLOW_CTRL 0 -#undef UART_XONXOFF_FLOW_CTRL #define UART_XONXOFF_FLOW_CTRL 1 -#undef UART_BAUD_RATE +#ifndef UART_BAUD_RATE #define UART_BAUD_RATE UART_RATE_1000000 +#endif #endif /* __COMMON_CONF_JN516X_H__ */ diff --git a/examples/platform-specific/jn516x/tsch/common-conf.h b/examples/platform-specific/jn516x/tsch/common-conf.h index 886ce4884..28c5e2835 100644 --- a/examples/platform-specific/jn516x/tsch/common-conf.h +++ b/examples/platform-specific/jn516x/tsch/common-conf.h @@ -40,30 +40,23 @@ #define TSCH_LOG_CONF_PER_SLOT 1 #define WITH_COAP_RESOURCES 0 -#undef ENABLE_COOJA_DEBUG #define ENABLE_COOJA_DEBUG 0 -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0x5254 -#undef TSCH_CONF_DEFAULT_HOPPING_SEQUENCE #define TSCH_HOPPING_SEQUENCE_MY_SEQUENCE (uint8_t[]){17, 23, 15, 25, 19, 11, 13, 21} #define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE TSCH_HOPPING_SEQUENCE_MY_SEQUENCE -#undef TSCH_CONF_JOIN_MY_PANID_ONLY #define TSCH_CONF_JOIN_MY_PANID_ONLY 1 -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 #define RPL_CALLBACK_PARENT_SWITCH tsch_rpl_callback_parent_switch #define RPL_CALLBACK_NEW_DIO_INTERVAL tsch_rpl_callback_new_dio_interval /* RPL Trickle timer tuning */ -#undef RPL_CONF_DIO_INTERVAL_MIN #define RPL_CONF_DIO_INTERVAL_MIN 12 /* 4.096 s */ -#undef RPL_CONF_DIO_INTERVAL_DOUBLINGS #define RPL_CONF_DIO_INTERVAL_DOUBLINGS 2 /* Max factor: x4. 4.096 s * 4 = 16.384 s */ #define TSCH_CONF_EB_PERIOD (4 * CLOCK_SECOND) @@ -90,33 +83,25 @@ /* CoAP */ -#undef COAP_SERVER_PORT #define COAP_SERVER_PORT 5684 -#undef COAP_OBSERVE_RETURNS_REPRESENTATION #define COAP_OBSERVE_RETURNS_REPRESENTATION 1 /* RPL */ -#undef UIP_CONF_ROUTER #define UIP_CONF_ROUTER 1 /* RPL storing mode */ -#undef RPL_CONF_MOP #define RPL_CONF_MOP RPL_MOP_STORING_NO_MULTICAST /* Default link metric */ -#undef RPL_CONF_INIT_LINK_METRIC #define RPL_CONF_INIT_LINK_METRIC 2 /* default 5 */ #define RPL_CONF_MAX_INSTANCES 1 /* default 1 */ #define RPL_CONF_MAX_DAG_PER_INSTANCE 1 /* default 2 */ /* No RA, No NS */ -#undef UIP_CONF_TCP #define UIP_CONF_TCP 0 -#undef UIP_CONF_DS6_ADDR_NBU #define UIP_CONF_DS6_ADDR_NBU 1 -#undef UIP_CONF_UDP_CHECKSUMS #define UIP_CONF_UDP_CHECKSUMS 1 /* Link-layer security */ @@ -130,21 +115,15 @@ #if MAC_CONF_WITH_CSMA /* Configure Csma with ACK (default MAC) */ -#undef MICROMAC_CONF_CHANNEL #define MICROMAC_CONF_CHANNEL 26 -#undef MICROMAC_CONF_AUTOACK #define MICROMAC_CONF_AUTOACK 1 /* increase internal radio buffering */ -#undef MIRCOMAC_CONF_BUF_NUM #define MIRCOMAC_CONF_BUF_NUM 4 #endif /* MAC_CONF_WITH_CSMA */ -#undef CONTIKI_VERSION_STRING -#define CONTIKI_VERSION_STRING "Contiki 3.x" - #include "common-conf-jn516x.h" #endif /* __COMMON_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/Makefile b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/Makefile index 9f06ae400..df37a89af 100644 --- a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/Makefile +++ b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/Makefile @@ -7,9 +7,6 @@ CONTIKI=../../../../../.. PROJECTDIRS += .. ../../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DREST=coap_rest_implementation -CFLAGS += -DUIP_CONF_TCP=0 MAKE_MAC = MAKE_MAC_TSCH MODULES += os/net/app-layer/coap MODULES += os/services/orchestra os/lib/json diff --git a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/project-conf.h b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/project-conf.h index 4e08f561c..360fdef25 100644 --- a/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/project-conf.h +++ b/examples/platform-specific/jn516x/tsch/simple-sensor-network/node/project-conf.h @@ -35,9 +35,9 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ -#include "../../common-conf.h" - -#undef UART_BAUD_RATE +#define UIP_CONF_TCP 0 #define UART_BAUD_RATE UART_RATE_115200 +#include "../../common-conf.h" + #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/Makefile b/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/Makefile index f5f3b009e..41c732ba2 100644 --- a/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/Makefile +++ b/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/Makefile @@ -9,9 +9,6 @@ PROJECT_SOURCEFILES += slip-bridge.c slip.c PROJECTDIRS += .. ../../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DREST=coap_rest_implementation -CFLAGS += -DUIP_CONF_TCP=0 MAKE_MAC = MAKE_MAC_TSCH MODULES += os/net/app-layer/coap MODULES += os/services/orchestra os/lib/json diff --git a/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/project-conf.h b/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/project-conf.h index de5e4bdd6..52f716c41 100644 --- a/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/project-conf.h +++ b/examples/platform-specific/jn516x/tsch/simple-sensor-network/rpl-border-router/project-conf.h @@ -35,14 +35,13 @@ #define UIP_FALLBACK_INTERFACE rpl_interface #endif +#define UIP_CONF_TCP 0 + /* Needed for slip-bridge */ -#undef SLIP_BRIDGE_CONF_NO_PUTCHAR #define SLIP_BRIDGE_CONF_NO_PUTCHAR 0 +#define UART_BAUD_RATE UART_RATE_230400 + #include "../../common-conf.h" -#undef UART_BAUD_RATE -#define UART_BAUD_RATE UART_RATE_230400 - - #endif /* PROJECT_ROUTER_CONF_H_ */ diff --git a/examples/platform-specific/jn516x/tsch/tx-power-verification/node/Makefile b/examples/platform-specific/jn516x/tsch/tx-power-verification/node/Makefile index 9a9cdc4f4..977210702 100644 --- a/examples/platform-specific/jn516x/tsch/tx-power-verification/node/Makefile +++ b/examples/platform-specific/jn516x/tsch/tx-power-verification/node/Makefile @@ -8,9 +8,6 @@ CONTIKI=../../../../../.. PROJECTDIRS += .. ../../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DREST=coap_rest_implementation -CFLAGS += -DUIP_CONF_TCP=0 MAKE_MAC = MAKE_MAC_TSCH MODULES += os/net/app-layer/coap MODULES += os/services/orchestra os/lib/json diff --git a/examples/platform-specific/jn516x/tsch/tx-power-verification/node/project-conf.h b/examples/platform-specific/jn516x/tsch/tx-power-verification/node/project-conf.h index 77890c46e..0394b0ad5 100644 --- a/examples/platform-specific/jn516x/tsch/tx-power-verification/node/project-conf.h +++ b/examples/platform-specific/jn516x/tsch/tx-power-verification/node/project-conf.h @@ -34,9 +34,9 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ -#include "../../common-conf.h" - -#undef UART_BAUD_RATE +#define UIP_CONF_TCP 0 #define UART_BAUD_RATE UART_RATE_115200 +#include "../../common-conf.h" + #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/Makefile b/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/Makefile index 38c7a7ec2..c88fa5a2b 100644 --- a/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/Makefile +++ b/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/Makefile @@ -10,8 +10,6 @@ PROJECT_SOURCEFILES += slip-bridge.c slip.c PROJECTDIRS += .. ../../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DUIP_CONF_TCP=0 MAKE_MAC = MAKE_MAC_TSCH MODULES += os/net/app-layer/coap MODULES += os/services/orchestra os/lib/json diff --git a/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/project-conf.h b/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/project-conf.h index 8a91daac0..c34c364e3 100644 --- a/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/project-conf.h +++ b/examples/platform-specific/jn516x/tsch/tx-power-verification/rpl-border-router/project-conf.h @@ -36,15 +36,13 @@ #endif /* Needed for slip-bridge */ -#undef SLIP_BRIDGE_CONF_NO_PUTCHAR #define SLIP_BRIDGE_CONF_NO_PUTCHAR 0 +#define UIP_CONF_TCP 0 +#define QUEUEBUF_CONF_NUM 16 + +#define TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES 8 + #include "../../common-conf.h" -#undef QUEUEBUF_CONF_NUM -#define QUEUEBUF_CONF_NUM 16 - -#undef TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES -#define TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES 8 - #endif /* PROJECT_ROUTER_CONF_H_ */ diff --git a/examples/platform-specific/jn516x/tsch/uart1-test-node/Makefile b/examples/platform-specific/jn516x/tsch/uart1-test-node/Makefile index 22d1fdeb2..ca520969d 100644 --- a/examples/platform-specific/jn516x/tsch/uart1-test-node/Makefile +++ b/examples/platform-specific/jn516x/tsch/uart1-test-node/Makefile @@ -9,9 +9,6 @@ CONTIKI=../../../../.. PROJECTDIRS += .. ../tools PROJECT_SOURCEFILES += rpl-tools.c -CFLAGS += -DWITH_COAP -CFLAGS += -DREST=coap_rest_implementation -CFLAGS += -DUIP_CONF_TCP=0 MAKE_MAC = MAKE_MAC_TSCH MODULES += os/net/app-layer/coap MODULES += os/services/orchestra os/lib/json diff --git a/examples/platform-specific/jn516x/tsch/uart1-test-node/project-conf.h b/examples/platform-specific/jn516x/tsch/uart1-test-node/project-conf.h index f72569a3c..373ea0f27 100644 --- a/examples/platform-specific/jn516x/tsch/uart1-test-node/project-conf.h +++ b/examples/platform-specific/jn516x/tsch/uart1-test-node/project-conf.h @@ -34,18 +34,16 @@ #ifndef __PROJECT_CONF_H__ #define __PROJECT_CONF_H__ -#include "../common-conf.h" +#define UIP_CONF_TCP 0 -#undef UART_BAUD_RATE #define UART_BAUD_RATE UART_RATE_115200 -#undef UART1_BAUD_RATE #define UART1_BAUD_RATE UART_RATE_115200 -#undef UART1_CONF_TX_BUFFER_SIZE #define UART1_CONF_TX_BUFFER_SIZE 32 -#undef UART1_CONF_RX_BUFFER_SIZE #define UART1_CONF_RX_BUFFER_SIZE 32 +#include "../common-conf.h" + #endif /* __PROJECT_CONF_H__ */ diff --git a/examples/platform-specific/nrf52dk/coap-demo/project-conf.h b/examples/platform-specific/nrf52dk/coap-demo/project-conf.h index 2b097e8a8..3de6ff08e 100644 --- a/examples/platform-specific/nrf52dk/coap-demo/project-conf.h +++ b/examples/platform-specific/nrf52dk/coap-demo/project-conf.h @@ -46,33 +46,26 @@ #define __PROJECT_ERBIUM_CONF_H__ /* Disabling TCP on CoAP nodes. */ -#undef UIP_CONF_TCP #define UIP_CONF_TCP 0 /* Increase rpl-border-router IP-buffer when using more than 64. */ -#undef REST_MAX_CHUNK_SIZE #define REST_MAX_CHUNK_SIZE 48 /* Estimate your header size, especially when using Proxy-Uri. */ /* - #undef COAP_MAX_HEADER_SIZE #define COAP_MAX_HEADER_SIZE 70 */ /* Multiplies with chunk size, be aware of memory constraints. */ -#undef COAP_MAX_OPEN_TRANSACTIONS #define COAP_MAX_OPEN_TRANSACTIONS 4 /* Must be <= open transactions, default is COAP_MAX_OPEN_TRANSACTIONS-1. */ /* - #undef COAP_MAX_OBSERVERS #define COAP_MAX_OBSERVERS 2 */ /* Filtering .well-known/core per query can be disabled to save space. */ -#undef COAP_LINK_FORMAT_FILTERING #define COAP_LINK_FORMAT_FILTERING 0 -#undef COAP_PROXY_OPTION_PROCESSING #define COAP_PROXY_OPTION_PROCESSING 0 /* Enable client-side support for COAP observe */ diff --git a/examples/platform-specific/zoul/at-test/project-conf.h b/examples/platform-specific/zoul/at-test/project-conf.h index f2f918b48..3b756a01b 100644 --- a/examples/platform-specific/zoul/at-test/project-conf.h +++ b/examples/platform-specific/zoul/at-test/project-conf.h @@ -55,8 +55,6 @@ /* Override serial-line defaults */ #define SERIAL_LINE_CONF_BUFSIZE 128 -#undef IGNORE_CHAR -#undef END #define IGNORE_CHAR(c) (c == 0x0d) #define END 0x0a diff --git a/examples/platform-specific/zoul/orion/client/project-conf.h b/examples/platform-specific/zoul/orion/client/project-conf.h index cbe867a14..ca2361f0a 100644 --- a/examples/platform-specific/zoul/orion/client/project-conf.h +++ b/examples/platform-specific/zoul/orion/client/project-conf.h @@ -35,7 +35,6 @@ /* Use either the cc1200_driver for sub-1GHz, or cc2538_rf_driver (default) * for 2.4GHz built-in radio interface */ -#undef NETSTACK_CONF_RADIO #define NETSTACK_CONF_RADIO cc2538_rf_driver /* Alternate between ANTENNA_SW_SELECT_SUBGHZ or ANTENNA_SW_SELECT_2_4GHZ */ diff --git a/examples/platform-specific/zoul/orion/ip64-router/Makefile b/examples/platform-specific/zoul/orion/ip64-router/Makefile index 4e184b119..8300617ca 100644 --- a/examples/platform-specific/zoul/orion/ip64-router/Makefile +++ b/examples/platform-specific/zoul/orion/ip64-router/Makefile @@ -6,7 +6,6 @@ CONTIKI = ../../../../.. WITH_IP64 = 1 -DEFINES += UIP_CONF_TCP=1 PROJECT_SOURCEFILES += httpd-simple.c include $(CONTIKI)/Makefile.include diff --git a/examples/platform-specific/zoul/orion/ip64-router/project-conf.h b/examples/platform-specific/zoul/orion/ip64-router/project-conf.h index 3918b646b..bbec833ad 100644 --- a/examples/platform-specific/zoul/orion/ip64-router/project-conf.h +++ b/examples/platform-specific/zoul/orion/ip64-router/project-conf.h @@ -55,7 +55,6 @@ /* Use either the cc1200_driver for sub-1GHz, or cc2538_rf_driver (default) * for 2.4GHz built-in radio interface */ -#undef NETSTACK_CONF_RADIO #define NETSTACK_CONF_RADIO cc2538_rf_driver /* USe DHCP */ @@ -66,6 +65,7 @@ #define UIP_CONF_RECEIVE_WINDOW 128 #define WEBSERVER_CONF_CFS_CONNS 2 #define UIP_CONF_BUFFER_SIZE 900 +#define UIP_CONF_TCP 1 #define UIP_CONF_TCP_MSS 128 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/sensniff/project-conf.h b/examples/sensniff/project-conf.h index a68cfc933..f9097d465 100644 --- a/examples/sensniff/project-conf.h +++ b/examples/sensniff/project-conf.h @@ -33,7 +33,6 @@ #define PROJECT_CONF_H_ /*---------------------------------------------------------------------------*/ /* Configure the sensniff_mac_driver for netstack.h */ -#undef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC sensniff_mac_driver /*---------------------------------------------------------------------------*/ /* Include platform-specific header */ diff --git a/os/dev/serial-line.c b/os/dev/serial-line.c index 6c54331d8..80ff5510b 100644 --- a/os/dev/serial-line.c +++ b/os/dev/serial-line.c @@ -45,8 +45,13 @@ #error Change SERIAL_LINE_CONF_BUFSIZE in contiki-conf.h. #endif +#ifndef IGNORE_CHAR #define IGNORE_CHAR(c) (c == 0x0d) +#endif + +#ifndef END #define END 0x0a +#endif static struct ringbuf rxbuf; static uint8_t rxbuf_data[BUFSIZE]; diff --git a/os/net/app-layer/coap/coap-conf.h b/os/net/app-layer/coap/coap-conf.h index 00d13d7c5..2aabc4be4 100644 --- a/os/net/app-layer/coap/coap-conf.h +++ b/os/net/app-layer/coap/coap-conf.h @@ -40,13 +40,18 @@ #define ER_COAP_CONF_H_ /* Features that can be disabled to achieve smaller memory footprint */ +#ifndef COAP_LINK_FORMAT_FILTERING #define COAP_LINK_FORMAT_FILTERING 0 +#endif /* COAP_LINK_FORMAT_FILTERING */ + +#ifndef COAP_PROXY_OPTION_PROCESSING #define COAP_PROXY_OPTION_PROCESSING 0 +#endif /* COAP_PROXY_OPTION_PROCESSING */ /* Listening port for the CoAP REST Engine */ #ifndef COAP_SERVER_PORT #define COAP_SERVER_PORT COAP_DEFAULT_PORT -#endif +#endif /* COAP_SERVER_PORT */ /* The number of concurrent messages that can be stored for retransmission in the transaction layer. */ #ifndef COAP_MAX_OPEN_TRANSACTIONS @@ -69,6 +74,8 @@ #endif /* COAP_MAX_OBSERVERS */ /* Interval in notifies in which NON notifies are changed to CON notifies to check client. */ +#ifndef COAP_OBSERVE_REFRESH_INTERVAL #define COAP_OBSERVE_REFRESH_INTERVAL 20 +#endif /* COAP_OBSERVE_REFRESH_INTERVAL */ #endif /* ER_COAP_CONF_H_ */ diff --git a/os/net/app-layer/httpd-ws/httpd-ws.h b/os/net/app-layer/httpd-ws/httpd-ws.h index 9b6429979..a1164d94f 100644 --- a/os/net/app-layer/httpd-ws/httpd-ws.h +++ b/os/net/app-layer/httpd-ws/httpd-ws.h @@ -45,9 +45,9 @@ #ifndef WEBSERVER_CONF_CFS_PATHLEN #define HTTPD_PATHLEN 80 -#else /* WEBSERVER_CONF_CFS_CONNS */ +#else /* WEBSERVER_CONF_CFS_PATHLEN */ #define HTTPD_PATHLEN WEBSERVER_CONF_CFS_PATHLEN -#endif /* WEBSERVER_CONF_CFS_CONNS */ +#endif /* WEBSERVER_CONF_CFS_PATHLEN */ #ifndef WEBSERVER_CONF_INBUF_SIZE #define HTTPD_INBUF_SIZE (HTTPD_PATHLEN + 90) diff --git a/tests/08-ipv6/code/receiver/project-conf.h b/tests/08-ipv6/code/receiver/project-conf.h index 118578620..3ac43a91c 100644 --- a/tests/08-ipv6/code/receiver/project-conf.h +++ b/tests/08-ipv6/code/receiver/project-conf.h @@ -1,7 +1,5 @@ -#undef UIP_CONF_ND6_SEND_NS #define UIP_CONF_ND6_SEND_NS 1 #ifdef BUFSIZE -#undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE BUFSIZE #endif /* BUFSIZE */ diff --git a/tests/08-ipv6/code/sender/project-conf.h b/tests/08-ipv6/code/sender/project-conf.h index 118578620..3ac43a91c 100644 --- a/tests/08-ipv6/code/sender/project-conf.h +++ b/tests/08-ipv6/code/sender/project-conf.h @@ -1,7 +1,5 @@ -#undef UIP_CONF_ND6_SEND_NS #define UIP_CONF_ND6_SEND_NS 1 #ifdef BUFSIZE -#undef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE BUFSIZE #endif /* BUFSIZE */ diff --git a/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h b/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h index 662bfcd88..52b95b95c 100644 --- a/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h +++ b/tests/13-ieee802154/code-flush-nbr-queue/project-conf.h @@ -35,17 +35,13 @@ #define UNIT_TEST_PRINT_FUNCTION test_print_report /* Set the minimum value of QUEUEBUF_CONF_NUM for the flush_nbr_queue test */ -#undef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 1 /* TSCH per-slot logging */ -#undef TSCH_LOG_CONF_PER_SLOT #define TSCH_LOG_CONF_PER_SLOT 1 -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 1 -#undef TSCH_CONF_WITH_SIXTOP #define TSCH_CONF_WITH_SIXTOP 1 #if CONTIKI_TARGET_COOJA diff --git a/tests/13-ieee802154/code/project-tsch-conf.h b/tests/13-ieee802154/code/project-tsch-conf.h index bbe7c655b..868af4675 100644 --- a/tests/13-ieee802154/code/project-tsch-conf.h +++ b/tests/13-ieee802154/code/project-tsch-conf.h @@ -35,21 +35,15 @@ #if WITH_SECURITY_ON #define TEST_CONFIG_TYPE SECURITY_ON -#undef LLSEC802154_CONF_ENABLED #define LLSEC802154_CONF_ENABLED 1 #elif WITH_ALL_ENABLED #define TEST_CONFIG_TYPE ALL_ENABLED -#undef TSCH_PACKET_CONF_EACK_WITH_DEST_ADDR #define TSCH_PACKET_CONF_EACK_WITH_DEST_ADDR 1 -#undef TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR #define TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR 1 -#undef TSCH_PACKET_CONF_EB_WITH_TIMESLOT_TIMING #define TSCH_PACKET_CONF_EB_WITH_TIMESLOT_TIMING 1 -#undef TSCH_PACKET_CONF_EB_WITH_HOPPING_SEQUENCE #define TSCH_PACKET_CONF_EB_WITH_HOPPING_SEQUENCE 1 -#undef TSCH_PACKET_EB_WITH_SLOTFRAME_AND_LINK #define TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK 1 #endif diff --git a/tests/14-rpl-lite/code/project-conf.h b/tests/14-rpl-lite/code/project-conf.h index f4544bf5e..599ac1cbf 100644 --- a/tests/14-rpl-lite/code/project-conf.h +++ b/tests/14-rpl-lite/code/project-conf.h @@ -28,5 +28,4 @@ */ #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1 -#undef RPL_CONF_MOP #define RPL_CONF_MOP RPL_MOP_NON_STORING diff --git a/tests/16-6tisch/code/project-conf.h b/tests/16-6tisch/code/project-conf.h index 0e857cbd6..3cd35f11d 100644 --- a/tests/16-6tisch/code/project-conf.h +++ b/tests/16-6tisch/code/project-conf.h @@ -37,36 +37,27 @@ //#error "This file is intended to be used for Cooja mote." #endif /* CONTIKI_TARGET_COOJA */ -#undef SIXTOP_CONF_MAX_SCHEDULING_FUNCTIONS #define SIXTOP_CONF_MAX_SCHEDULING_FUNCTIONS 2 -#undef SIXTOP_CONF_MAX_TRANSACTIONS #define SIXTOP_CONF_MAX_TRANSACTIONS 2 -#undef SIXP_CONF_WITH_PAYLOAD_TERMINATION_IE #define SIXP_CONF_WITH_PAYLOAD_TERMINATION_IE 1 -#undef NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_CONF_MAX_NEIGHBORS 2 #define UNIT_TEST_PRINT_FUNCTION test_print_report -#undef TSCH_CONF_WITH_SIXTOP #define TSCH_CONF_WITH_SIXTOP 1 -#undef TSCH_LOG_CONF_PER_SLOT #define TSCH_LOG_CONF_PER_SLOT 1 #define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG -#undef TSCH_CONF_AUTOSTART #define TSCH_CONF_AUTOSTART 0 -#undef IEEE802154_CONF_PANID #define IEEE802154_CONF_PANID 0xabcd /* Custom MAC layer */ -#undef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC test_mac_driver #endif /* __PROJECT_CONF_H__ */