From 0a7094bc39be218db0f6be3b4af626b8c46fa1ae Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 10:53:17 +0000 Subject: [PATCH 01/16] Remove leftover make targets The sensinode platform does not support .upload and .serialdump Their presence in the makefile has confused in the past confused some users. This commit removes them The commit also removes the $(OBJECTDIR)/%.rel: %.cS recipe which is not used by either 8051 platform and is probably broken anyway, since it has been unmaintained for years --- cpu/cc2430/Makefile.cc2430 | 7 ------- cpu/cc253x/Makefile.cc253x | 7 ------- platform/cc2530dk/Makefile.cc2530dk | 6 ------ 3 files changed, 20 deletions(-) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 4101416ab..b83e3cc80 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -129,13 +129,6 @@ $(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) $(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ @$(FINALIZE_SDCC_DEPENDENCY) -$(OBJECTDIR)/%.rel: %.cS | $(OBJECTDIR) - cp $< $(OBJECTDIR)/$*.c - $(CC) $(CFLAGS) -E $(OBJECTDIR)/$*.c > $(OBJECTDIR)/tmp - perl -pe "s/^#(.*)/;$$1/" $(OBJECTDIR)/tmp > $(OBJECTDIR)/$*.S - $(AS) $(ASFLAGS) -o $@ $(OBJECTDIR)/$*.S - rm -f $(OBJECTDIR)/tmp - contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) rm -f $@ diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index f919285c2..ff8b61648 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -150,13 +150,6 @@ $(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) $(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ @$(FINALIZE_SDCC_DEPENDENCY) -$(OBJECTDIR)/%.rel: %.cS | $(OBJECTDIR) - cp $< $(OBJECTDIR)/$*.c - $(CC) $(CFLAGS) -E $(OBJECTDIR)/$*.c > $(OBJECTDIR)/tmp - perl -pe "s/^#(.*)/;$$1/" $(OBJECTDIR)/tmp > $(OBJECTDIR)/$*.S - $(AS) $(ASFLAGS) -o $@ $(OBJECTDIR)/$*.S - rm -f $(OBJECTDIR)/tmp - contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ $(CONTIKI_ASMOBJECTFILES) $(CONTIKI_CASMOBJECTFILES) rm -f $@ diff --git a/platform/cc2530dk/Makefile.cc2530dk b/platform/cc2530dk/Makefile.cc2530dk index f8d9c54ab..cae4911b5 100644 --- a/platform/cc2530dk/Makefile.cc2530dk +++ b/platform/cc2530dk/Makefile.cc2530dk @@ -43,12 +43,6 @@ FORCE: @egrep '(^BANK[1-9][^=])' $(<:.hex=.map) | uniq | sort @egrep -A 5 'Other memory' $(<:.hex=.mem) -%.upload: %.hex - $(PROG) -P $< - -sensinode.serialdump: - $(SERIALDUMP) - ### Define the CPU directory CONTIKI_CPU=$(CONTIKI)/cpu/cc253x include $(CONTIKI_CPU)/Makefile.cc253x From fa166116b7835baa74852f1dbde6de2510595147 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 12:03:10 +0000 Subject: [PATCH 02/16] Auto-enable SLIP for 8051-based platforms --- platform/cc2530dk/contiki-conf.h | 4 ++++ platform/sensinode/contiki-conf.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index ae7a9641a..c673b0f43 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -62,6 +62,10 @@ #define USB_SERIAL_CONF_BUFFERED 1 #endif +#if defined (UIP_FALLBACK_INTERFACE) || defined (CMD_CONF_OUTPUT) +#define SLIP_ARCH_CONF_ENABLE 1 +#endif + /* Are we a SLIP bridge? */ #if SLIP_ARCH_CONF_ENABLE /* Make sure the UART is enabled, with interrupts */ diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index 21ae8f655..d7d9aa30c 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -62,6 +62,10 @@ #define UART_ONE_CONF_HIGH_SPEED 0 #endif +#if defined (UIP_FALLBACK_INTERFACE) || defined (CMD_CONF_OUTPUT) +#define SLIP_ARCH_CONF_ENABLE 1 +#endif + /* Are we a SLIP bridge? */ #if SLIP_ARCH_CONF_ENABLE /* Make sure UART1 is enabled, with interrupts */ From ecf8ca55ef4b7a839cc9bf2c644f566833f440f0 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 15:00:05 +0000 Subject: [PATCH 03/16] Move SLIP interface define to project-conf --- examples/cc2530dk/border-router/project-conf.h | 2 ++ examples/sensinode/border-router/project-conf.h | 1 + platform/cc2530dk/contiki-conf.h | 1 - platform/sensinode/contiki-conf.h | 1 - 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/cc2530dk/border-router/project-conf.h b/examples/cc2530dk/border-router/project-conf.h index 71d15ab63..1de93e878 100644 --- a/examples/cc2530dk/border-router/project-conf.h +++ b/examples/cc2530dk/border-router/project-conf.h @@ -51,4 +51,6 @@ * Has no effect when building for the SmartRF. */ #define USB_SERIAL_CONF_BUFFERED 1 +#define UIP_FALLBACK_INTERFACE slip_interface + #endif /* PROJECT_CONF_H_ */ diff --git a/examples/sensinode/border-router/project-conf.h b/examples/sensinode/border-router/project-conf.h index f0fdb71fd..17cbe3193 100644 --- a/examples/sensinode/border-router/project-conf.h +++ b/examples/sensinode/border-router/project-conf.h @@ -46,5 +46,6 @@ #define VIZTOOL_MAX_PAYLOAD_LEN 120 #define SLIP_ARCH_CONF_ENABLE 1 #define LPM_CONF_MODE 0 +#define UIP_FALLBACK_INTERFACE slip_interface #endif /* PROJECT_CONF_H_ */ diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index c673b0f43..1a3d16fb3 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -73,7 +73,6 @@ #undef UART0_CONF_WITH_INPUT #define UART0_CONF_ENABLE 1 #define UART0_CONF_WITH_INPUT 1 -#define UIP_FALLBACK_INTERFACE slip_interface #endif /* Output all captured frames over the UART in hexdump format */ diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index d7d9aa30c..56f6cb3ed 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -73,7 +73,6 @@ #undef UART_ONE_CONF_WITH_INPUT #define UART_ONE_CONF_ENABLE 1 #define UART_ONE_CONF_WITH_INPUT 1 -#define UIP_FALLBACK_INTERFACE slip_interface #endif /* Output all captured frames over the UART in hexdump format */ From 70d8bd71dff4ac68fef9f814eca9d42398901657 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 15:01:30 +0000 Subject: [PATCH 04/16] Disable example-defined putchar for 8051 platforms --- platform/cc2530dk/contiki-conf.h | 2 ++ platform/sensinode/contiki-conf.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index 1a3d16fb3..620ae2a17 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -62,6 +62,8 @@ #define USB_SERIAL_CONF_BUFFERED 1 #endif +#define SLIP_RADIO_CONF_NO_PUTCHAR 1 + #if defined (UIP_FALLBACK_INTERFACE) || defined (CMD_CONF_OUTPUT) #define SLIP_ARCH_CONF_ENABLE 1 #endif diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index 56f6cb3ed..19a815c07 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -62,6 +62,8 @@ #define UART_ONE_CONF_HIGH_SPEED 0 #endif +#define SLIP_RADIO_CONF_NO_PUTCHAR 1 + #if defined (UIP_FALLBACK_INTERFACE) || defined (CMD_CONF_OUTPUT) #define SLIP_ARCH_CONF_ENABLE 1 #endif From 6a79ac3b2de463379272821e50c3af94adea5d28 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 15:03:31 +0000 Subject: [PATCH 05/16] Increase 8051 plaform configurability --- platform/cc2530dk/contiki-conf.h | 12 +++++++++++- platform/sensinode/contiki-conf.h | 9 ++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index 620ae2a17..f4fd61879 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -156,11 +156,13 @@ #endif /* UIP_CONF_IPV6 */ /* Network Stack */ +#ifndef NETSTACK_CONF_NETWORK #if UIP_CONF_IPV6 #define NETSTACK_CONF_NETWORK sicslowpan_driver #else #define NETSTACK_CONF_NETWORK rime_driver -#endif +#endif /* UIP_CONF_IPV6 */ +#endif /* NETSTACK_CONF_NETWORK */ #ifndef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC csma_driver @@ -176,7 +178,10 @@ #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 #endif +#ifndef NETSTACK_CONF_FRAMER #define NETSTACK_CONF_FRAMER framer_802154 +#endif + #define NETSTACK_CONF_RADIO cc2530_rf_driver /* RF Config */ @@ -227,7 +232,9 @@ #endif /* uIP */ +#ifndef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 240 +#endif #define UIP_CONF_IPV6_QUEUE_PKT 0 #define UIP_CONF_IPV6_CHECKS 1 #define UIP_CONF_IPV6_REASSEMBLY 0 @@ -247,7 +254,10 @@ } #define MAC_CONF_CHANNEL_CHECK_RATE 8 + +#ifndef QUEUEBUF_CONF_NUM #define QUEUEBUF_CONF_NUM 6 +#endif #else /* UIP_CONF_IPV6 */ /* Network setup for non-IPv6 (rime). */ diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index 19a815c07..e14a46c08 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -158,11 +158,13 @@ #endif /* Network Stack */ +#ifndef NETSTACK_CONF_NETWORK #if UIP_CONF_IPV6 #define NETSTACK_CONF_NETWORK sicslowpan_driver #else #define NETSTACK_CONF_NETWORK rime_driver -#endif +#endif /* UIP_CONF_IPV6 */ +#endif /* NETSTACK_CONF_NETWORK */ #ifndef NETSTACK_CONF_MAC #define NETSTACK_CONF_MAC csma_driver @@ -178,7 +180,10 @@ #define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8 #endif +#ifndef NETSTACK_CONF_FRAMER #define NETSTACK_CONF_FRAMER framer_802154 +#endif + #define NETSTACK_CONF_RADIO cc2430_rf_driver /* RF Config */ @@ -233,7 +238,9 @@ #endif /* uIP */ +#ifndef UIP_CONF_BUFFER_SIZE #define UIP_CONF_BUFFER_SIZE 240 +#endif #define UIP_CONF_IPV6_QUEUE_PKT 0 #define UIP_CONF_IPV6_CHECKS 1 #define UIP_CONF_IPV6_REASSEMBLY 0 From 0614c4e720e49018554eba0883a1ff962d15c930 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Wed, 20 Mar 2013 17:15:56 +0000 Subject: [PATCH 06/16] No longer build rpl-of0 for Sensinodes --- platform/sensinode/Makefile.sensinode | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/sensinode/Makefile.sensinode b/platform/sensinode/Makefile.sensinode index ea70cdfb1..743a51349 100644 --- a/platform/sensinode/Makefile.sensinode +++ b/platform/sensinode/Makefile.sensinode @@ -53,7 +53,6 @@ ifeq ($(UIP_CONF_IPV6),1) CONTIKI_TARGET_SOURCEFILES += disco.c endif CONTIKI_TARGET_SOURCEFILES += viztool.c - CONTIKI_SOURCEFILES += rpl-of0.c endif FORCE: From 1b0470687b52607020893bcd955a2ac7514891ff Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 23 Mar 2013 19:07:24 +0000 Subject: [PATCH 07/16] Change the cc2531 usb stick descriptor The CC2531 USB stick now identifies itself as a 'Texas Instruments CC2531 USB Dongle' and uses a TI-assigmed VID:PID. The VID:PID is now configurable in contiki- or project-conf.h --- cpu/cc253x/usb/cdc-acm-descriptors.c | 4 ++-- platform/cc2530dk/dev/usb-serial.c | 11 +++++++---- platform/cc2530dk/models.h | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cpu/cc253x/usb/cdc-acm-descriptors.c b/cpu/cc253x/usb/cdc-acm-descriptors.c index 8a5d7c844..3c1a78d88 100644 --- a/cpu/cc253x/usb/cdc-acm-descriptors.c +++ b/cpu/cc253x/usb/cdc-acm-descriptors.c @@ -14,8 +14,8 @@ const struct usb_st_device_descriptor device_descriptor = 0, 0, CTRL_EP_SIZE, - 0x0617, /* EPFL usb ID */ - 0x000B, /* Don't mess with it please */ + CDC_ACM_CONF_VID, + CDC_ACM_CONF_PID, 0x0000, 1, 2, diff --git a/platform/cc2530dk/dev/usb-serial.c b/platform/cc2530dk/dev/usb-serial.c index ff58b5ab9..eb9267f71 100644 --- a/platform/cc2530dk/dev/usb-serial.c +++ b/platform/cc2530dk/dev/usb-serial.c @@ -68,22 +68,25 @@ static struct { static const struct { uint8_t size; uint8_t type; - uint16_t string[10]; + uint16_t string[17]; } string_manufacturer = { sizeof(string_manufacturer), 3, - { 'E', 'P', 'F', 'L', '-', 'L', 'S', 'R', 'O', '1' } + { + 'T', 'e', 'x', 'a', 's', ' ', + 'I', 'n', 's', 't', 'r', 'u', 'm', 'e', 'n', 't', 's' + } }; static const struct { uint8_t size; uint8_t type; - uint16_t string[18]; + uint16_t string[17]; } string_product = { sizeof(string_product), 3, { 'C', 'C', '2', '5', '3', '1', ' ', - 'D', 'e', 'v', 'e', 'l', '-', 'B', 'o', 'a', 'r', 'd' + 'U', 'S', 'B', ' ', 'D', 'o', 'n', 'g', 'l', 'e' } }; /*---------------------------------------------------------------------------*/ diff --git a/platform/cc2530dk/models.h b/platform/cc2530dk/models.h index fde6811c8..06f4f72cb 100644 --- a/platform/cc2530dk/models.h +++ b/platform/cc2530dk/models.h @@ -81,6 +81,9 @@ #define USB_CONF_CLASS 1 /* CDC-ACM */ #endif +#define CDC_ACM_CONF_VID 0x0451 /* Vendor: TI */ +#define CDC_ACM_CONF_PID 0x16A8 /* cc2531 CDC */ + #undef LEDS_CONF_ALL #define LEDS_CONF_ALL 3 #define LEDS_RED 1 From f30d92b10153a757eaa6ce82ba1818e202cedbaa Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Wed, 3 Apr 2013 15:59:05 +0100 Subject: [PATCH 08/16] Change the way we switch between cc2530 models The switch is now performed through a configuration define, which has also been renamed to better match Contiki's naming conventions --- examples/cc2530dk/border-router/Makefile | 3 --- examples/cc2530dk/border-router/project-conf.h | 3 +++ examples/cc2530dk/cc2531-usb-demo/Makefile | 2 +- examples/cc2530dk/sniffer/Makefile | 1 - examples/cc2530dk/sniffer/project-conf.h | 3 +++ platform/cc2530dk/contiki-conf.h | 8 ++++++++ platform/cc2530dk/dev/button-sensor.c | 8 ++++---- platform/cc2530dk/dev/button-sensor.h | 8 ++++---- platform/cc2530dk/dev/io-arch.h | 2 +- platform/cc2530dk/dev/leds-arch.c | 6 +++--- platform/cc2530dk/dev/smartrf-sensors.c | 2 +- platform/cc2530dk/models.h | 2 +- 12 files changed, 29 insertions(+), 19 deletions(-) diff --git a/examples/cc2530dk/border-router/Makefile b/examples/cc2530dk/border-router/Makefile index 763b34cca..e37325dc6 100644 --- a/examples/cc2530dk/border-router/Makefile +++ b/examples/cc2530dk/border-router/Makefile @@ -1,6 +1,3 @@ -# To build for the cc2531 USB stick: -DEFINES+=MODEL_CC2531=1, - DEFINES+=PROJECT_CONF_H=\"project-conf.h\" # We need uIPv6, therefore we also need banking diff --git a/examples/cc2530dk/border-router/project-conf.h b/examples/cc2530dk/border-router/project-conf.h index 1de93e878..01e64dead 100644 --- a/examples/cc2530dk/border-router/project-conf.h +++ b/examples/cc2530dk/border-router/project-conf.h @@ -53,4 +53,7 @@ #define UIP_FALLBACK_INTERFACE slip_interface +/* Change to 0 to build for the SmartRF + cc2530 EM */ +#define MODELS_CONF_CC2531_USB_STICK 1 + #endif /* PROJECT_CONF_H_ */ diff --git a/examples/cc2530dk/cc2531-usb-demo/Makefile b/examples/cc2530dk/cc2531-usb-demo/Makefile index 404f8ce14..c6cbb7f84 100644 --- a/examples/cc2530dk/cc2531-usb-demo/Makefile +++ b/examples/cc2530dk/cc2531-usb-demo/Makefile @@ -1,6 +1,6 @@ CONTIKI_PROJECT = cc2531-usb-demo -DEFINES+=MODEL_CC2531=1 +DEFINES+=MODELS_CONF_CC2531_USB_STICK=1 all: $(CONTIKI_PROJECT) diff --git a/examples/cc2530dk/sniffer/Makefile b/examples/cc2530dk/sniffer/Makefile index 2fcdf669d..d9491a92c 100644 --- a/examples/cc2530dk/sniffer/Makefile +++ b/examples/cc2530dk/sniffer/Makefile @@ -1,5 +1,4 @@ DEFINES+=PROJECT_CONF_H -DEFINES+=MODEL_CC2531=1 PROJECT_SOURCEFILES += stub-rdc.c CONTIKI_PROJECT = sniffer diff --git a/examples/cc2530dk/sniffer/project-conf.h b/examples/cc2530dk/sniffer/project-conf.h index a08744337..9f8af335a 100644 --- a/examples/cc2530dk/sniffer/project-conf.h +++ b/examples/cc2530dk/sniffer/project-conf.h @@ -47,6 +47,9 @@ #define LPM_CONF_MODE 0 #define UART0_CONF_HIGH_SPEED 1 +/* Change to 0 to build for the SmartRF + cc2530 EM */ +#define MODELS_CONF_CC2531_USB_STICK 1 + /* Used by cc2531 USB dongle builds, has no effect on SmartRF builds */ #define USB_SERIAL_CONF_BUFFERED 1 diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index f4fd61879..4c9804dd1 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -10,6 +10,14 @@ #include "project-conf.h" #endif /* PROJECT_CONF_H */ +/* + * Build for SmartRF05EB+CC2530EM by default. + * This define needs to have its final value before inclusion of models.h + */ +#ifndef MODELS_CONF_CC2531_USB_STICK +#define MODELS_CONF_CC2531_USB_STICK 0 +#endif + #include "models.h" /* diff --git a/platform/cc2530dk/dev/button-sensor.c b/platform/cc2530dk/dev/button-sensor.c index 4f5f1347d..27db847af 100644 --- a/platform/cc2530dk/dev/button-sensor.c +++ b/platform/cc2530dk/dev/button-sensor.c @@ -63,7 +63,7 @@ configure_b1(int type, int value) { switch(type) { case SENSORS_HW_INIT: -#if !MODEL_CC2531 +#if !MODELS_CONF_CC2531_USB_STICK P0INP |= 2; /* Tri-state */ #endif BUTTON_IRQ_ON_PRESS(1); @@ -87,7 +87,7 @@ configure_b1(int type, int value) /*---------------------------------------------------------------------------*/ /* Button 2 - cc2531 USb Dongle only */ /*---------------------------------------------------------------------------*/ -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK static int value_b2(int type) { @@ -138,7 +138,7 @@ configure_b2(int type, int value) #if CC_CONF_OPTIMIZE_STACK_SIZE #pragma exclude bits #endif -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK void port_1_isr(void) __interrupt(P1INT_VECTOR) { @@ -195,6 +195,6 @@ port_0_isr(void) __interrupt(P0INT_VECTOR) #pragma restore /*---------------------------------------------------------------------------*/ SENSORS_SENSOR(button_1_sensor, BUTTON_SENSOR, value_b1, configure_b1, status_b1); -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK SENSORS_SENSOR(button_2_sensor, BUTTON_SENSOR, value_b2, configure_b2, status_b2); #endif diff --git a/platform/cc2530dk/dev/button-sensor.h b/platform/cc2530dk/dev/button-sensor.h index 6fd1a2fb5..82cd2ec17 100644 --- a/platform/cc2530dk/dev/button-sensor.h +++ b/platform/cc2530dk/dev/button-sensor.h @@ -54,7 +54,7 @@ * B2: P1_3 * */ -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK #define BUTTON1_PORT 1 #define BUTTON1_PIN 2 #define BUTTON2_PORT 1 @@ -73,7 +73,7 @@ extern const struct sensors_sensor button_1_sensor; extern const struct sensors_sensor button_2_sensor; #if BUTTON_SENSOR_ON -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK /* USB Dongle */ /* Buttons: P1_2 & P1_3 - Port 1 ISR needed */ void port_1_isr(void) __interrupt(P1INT_VECTOR); @@ -82,12 +82,12 @@ void port_1_isr(void) __interrupt(P1INT_VECTOR); button_2_sensor.configure(SENSORS_ACTIVE, 1); \ } while(0) -#else /* MODEL_CC2531 */ +#else /* MODELS_CONF_CC2531_USB_STICK */ /* SmartRF */ /* Button 1: P0_1 - Port 0 ISR needed */ void port_0_isr(void) __interrupt(P0INT_VECTOR); #define BUTTON_SENSOR_ACTIVATE() button_sensor.configure(SENSORS_ACTIVE, 1) -#endif /* MODEL_CC2531 */ +#endif /* MODELS_CONF_CC2531_USB_STICK */ #else /* BUTTON_SENSOR_ON */ #define BUTTON_SENSOR_ACTIVATE() diff --git a/platform/cc2530dk/dev/io-arch.h b/platform/cc2530dk/dev/io-arch.h index f5811e0b6..33c9a026f 100644 --- a/platform/cc2530dk/dev/io-arch.h +++ b/platform/cc2530dk/dev/io-arch.h @@ -48,7 +48,7 @@ #include "contiki.h" /*---------------------------------------------------------------------------*/ -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK #include "dev/usb-serial.h" #define IO_ARCH_PREFIX usb_serial diff --git a/platform/cc2530dk/dev/leds-arch.c b/platform/cc2530dk/dev/leds-arch.c index 566fb000c..00fbb3b0e 100644 --- a/platform/cc2530dk/dev/leds-arch.c +++ b/platform/cc2530dk/dev/leds-arch.c @@ -44,7 +44,7 @@ void leds_arch_init(void) { -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK P1SEL &= ~LED1_MASK; P1DIR |= LED1_MASK; P0SEL &= ~LED2_MASK; @@ -58,7 +58,7 @@ leds_arch_init(void) unsigned char leds_arch_get(void) { -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK return (unsigned char)(LED1_PIN | ((LED2_PIN ^ 0x01) << 1)); #else return (unsigned char)(LED1_PIN | (LED2_PIN << 1) | (LED3_PIN << 2)); @@ -69,7 +69,7 @@ void leds_arch_set(unsigned char leds) { LED1_PIN = leds & 0x01; -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK LED2_PIN = ((leds & 0x02) >> 1) ^ 0x01; #else LED2_PIN = (leds & 0x02) >> 1; diff --git a/platform/cc2530dk/dev/smartrf-sensors.c b/platform/cc2530dk/dev/smartrf-sensors.c index 4bac66dab..d3fedc006 100644 --- a/platform/cc2530dk/dev/smartrf-sensors.c +++ b/platform/cc2530dk/dev/smartrf-sensors.c @@ -47,7 +47,7 @@ const struct sensors_sensor *sensors[] = { #endif #if BUTTON_SENSOR_ON &button_1_sensor, -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK &button_2_sensor, #endif #endif diff --git a/platform/cc2530dk/models.h b/platform/cc2530dk/models.h index 06f4f72cb..23989915c 100644 --- a/platform/cc2530dk/models.h +++ b/platform/cc2530dk/models.h @@ -64,7 +64,7 @@ * 1: P0_0 (Red) * 2: P1_1 (Green - active: low) */ -#if MODEL_CC2531 +#if MODELS_CONF_CC2531_USB_STICK #define MODEL_STRING "TI cc2531 USB Dongle\n" #define USB_CONF_ENABLE 1 From cdba557e5e3c328c0b0f49580d722a02a5924486 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 12:48:29 +0100 Subject: [PATCH 09/16] Don't build the Sensinode UDP server as RPL root The Sensinode UDP-IPv6 example used to build the UDP server to act as RPL root by default. This now changes, the server is a simple router. Support to build the server as RPL root is still there, it's just the default that changes --- examples/sensinode/udp-ipv6/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sensinode/udp-ipv6/server.c b/examples/sensinode/udp-ipv6/server.c index d569d1102..5033d8ac1 100644 --- a/examples/sensinode/udp-ipv6/server.c +++ b/examples/sensinode/udp-ipv6/server.c @@ -58,7 +58,7 @@ static uint16_t len; #define SERVER_REPLY 1 /* Should we act as RPL root? */ -#define SERVER_RPL_ROOT 1 +#define SERVER_RPL_ROOT 0 #if SERVER_RPL_ROOT static uip_ipaddr_t ipaddr; From b0257596655f86f7439da6361ec346cd47f8a54d Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 6 Aug 2013 17:02:38 +0100 Subject: [PATCH 10/16] Don't redirect sdld output to dev/null This was used in the past because sdld was very verbose when linking banked hex files. New sdld versions do not exhibit this level of verbosity and therefore the redirect can be stopped --- cpu/cc2430/Makefile.cc2430 | 4 ++-- cpu/cc253x/Makefile.cc253x | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index b83e3cc80..764403d28 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -147,14 +147,14 @@ $(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) ifeq ($(HAVE_BANKING),1) @echo "\nFirst Link" @echo "===============" - $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib > /dev/null + $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib @echo "\nBank Allocation" @echo "===============" python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) @echo "\nFinal Link" @echo "===============" endif - $(CC) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib > /dev/null + $(CC) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib # Pack the hex file for programmers which dislike SDCC output hex format %.hex: %.ihx diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index ff8b61648..232b4c52a 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -168,7 +168,7 @@ ifeq ($(HAVE_BANKING),1) %.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib @echo "\nFirst Link" @echo "===============" - $(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib > /dev/null + $(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.flags: %.ihx ### Allocate modules to banks and relocate object files @@ -180,7 +180,7 @@ ifeq ($(HAVE_BANKING),1) ### Link again with new bank allocations @echo "\nFinal Link" @echo "===============" - $(CC) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib > /dev/null + $(CC) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.hex: %.banked-hex ### Post-process the hex file for programmers which dislike SDCC output hex format @@ -202,7 +202,7 @@ ifeq ($(HAVE_BANKING),1) else ### Build non-banked firmware %.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib - $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib > /dev/null + $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.hex: %.ihx $(PACKIHX) $< > $@ From c89450a233921720b281ace00ae04525b27af5eb Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 6 Aug 2013 17:09:32 +0100 Subject: [PATCH 11/16] Change to sdar from the now deprecated sdcclib --- cpu/cc2430/Makefile.cc2430 | 4 ++-- cpu/cc253x/Makefile.cc253x | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 764403d28..47e0b70cf 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -2,7 +2,7 @@ CC = sdcc LD = sdcc AS = sdcc -AR = sdcclib +AR = sdar OBJCOPY = objcopy STRIP = strip PACKIHX = packihx @@ -18,7 +18,7 @@ LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) ASFLAGS += -plosgff -AROPTS = -a +AROPTS = -rc ### Our object files are .rel, so we can't use the default finalize dependency ### generation. Override here. diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index 232b4c52a..c9e6c661d 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -2,7 +2,7 @@ CC = sdcc LD = sdcc AS = sdcc -AR = sdcclib +AR = sdar OBJCOPY = objcopy STRIP = strip @@ -24,7 +24,7 @@ LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) ASFLAGS += -plosgff -AROPTS = -a +AROPTS = -rc ### Our object files are .rel, so we can't use the default finalize dependency ### generation. Override here. From 20f06e32713e52a0cc24a369fbf6ba960d9b6876 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 6 Aug 2013 17:19:01 +0100 Subject: [PATCH 12/16] Support verbosity control for 8051-based platforms --- cpu/cc2430/Makefile.cc2430 | 12 ++++++++---- cpu/cc253x/Makefile.cc253x | 15 ++++++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 47e0b70cf..34f5743be 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -126,7 +126,8 @@ CUSTOM_RULE_C_TO_OBJECTDIR_O=1 CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 $(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ @$(FINALIZE_SDCC_DEPENDENCY) contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ @@ -139,7 +140,8 @@ contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ # build app/example local object files. We need a separate rule so that we can # pass -DAUTOSTART_ENABLE for those files only $(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ # .ihx is the sdcc binary output file %.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib @@ -147,14 +149,16 @@ $(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) ifeq ($(HAVE_BANKING),1) @echo "\nFirst Link" @echo "===============" - $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib @echo "\nBank Allocation" @echo "===============" python $(BANK_ALLOC) $(basename $(@F)) $(SEGMENT_RULES) $(OFFSET_FIRMWARE) @echo "\nFinal Link" @echo "===============" endif - $(CC) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) $(LD_POST_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib # Pack the hex file for programmers which dislike SDCC output hex format %.hex: %.ihx diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index c9e6c661d..edb6f1bf5 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -147,7 +147,8 @@ CUSTOM_RULE_C_TO_OBJECTDIR_O=1 CUSTOM_RULE_ALLOBJS_TO_TARGETLIB=1 $(OBJECTDIR)/%.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) $(CFLAGS) -c $< -o $@ -Wp,-MMD,$(@:.rel=.d),-MQ,$@ @$(FINALIZE_SDCC_DEPENDENCY) contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ @@ -160,7 +161,8 @@ contiki-$(TARGET).lib: $(CONTIKI_OBJECTFILES) $(PROJECT_OBJECTFILES) \ # build app/example local object files. We need a separate rule so that we can # pass -DAUTOSTART_ENABLE for those files only $(OBJECTDIR)/%.app.rel: %.c $(SEGMENT_RULES) | $(OBJECTDIR) - $(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ + $(TRACE_CC) + $(Q)$(CC) $(call c_seg,$<,$@) -DAUTOSTART_ENABLE $(CFLAGS) -c $< -o $@ # .ihx is the sdcc binary output file ifeq ($(HAVE_BANKING),1) @@ -168,7 +170,8 @@ ifeq ($(HAVE_BANKING),1) %.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib @echo "\nFirst Link" @echo "===============" - $(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(CC) $(LDFLAGS) $(LD_PRE_FLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.flags: %.ihx ### Allocate modules to banks and relocate object files @@ -180,7 +183,8 @@ ifeq ($(HAVE_BANKING),1) ### Link again with new bank allocations @echo "\nFinal Link" @echo "===============" - $(CC) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) $(shell cat $<) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.hex: %.banked-hex ### Post-process the hex file for programmers which dislike SDCC output hex format @@ -202,7 +206,8 @@ ifeq ($(HAVE_BANKING),1) else ### Build non-banked firmware %.ihx: $(OBJECTDIR)/%.app.rel $(CONTIKI_TARGET_MAIN) contiki-$(TARGET).lib - $(CC) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib + $(TRACE_LD) + $(Q)$(LD) $(LDFLAGS) -o $@ $(CONTIKI_TARGET_MAIN) $(OBJECTDIR)/$*.app.rel -llibsdcc.lib -lcontiki-$(TARGET).lib %.hex: %.ihx $(PACKIHX) $< > $@ From cb075dec65eb131eb46ef78e8512c642bb72f3e0 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 15:36:30 +0100 Subject: [PATCH 13/16] Disable SDCC warnings 110 and 126 Those two warnings are optimisation-related * 110 warns that an always-false if branch has been optimised out * 126 warns about unreachable code which also gets optimised out In disabling those warnings, we make the build less cluttered --- cpu/cc2430/Makefile.cc2430 | 3 +++ cpu/cc253x/Makefile.cc253x | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cpu/cc2430/Makefile.cc2430 b/cpu/cc2430/Makefile.cc2430 index 34f5743be..2a8209129 100644 --- a/cpu/cc2430/Makefile.cc2430 +++ b/cpu/cc2430/Makefile.cc2430 @@ -12,6 +12,9 @@ SEGMENT_RULES = $(OBJECTDIR)/segment.rules CFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --std-c99 CFLAGS += --fomit-frame-pointer +### Disable warning 110 (EVELYN the modified dog) and 126 (unreachable code) +CFLAGS += --disable-warning 110 --disable-warning 126 + LDFLAGS += --model-$(MEMORY_MODEL) --stack-auto -DSDCC_CC2430 --out-fmt-ihx LDFLAGS += --xram-loc 0xE000 --xram-size 0x1F00 LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) diff --git a/cpu/cc253x/Makefile.cc253x b/cpu/cc253x/Makefile.cc253x index edb6f1bf5..25f993df9 100644 --- a/cpu/cc253x/Makefile.cc253x +++ b/cpu/cc253x/Makefile.cc253x @@ -18,6 +18,9 @@ CFLAGS += --model-$(MEMORY_MODEL) --stack-auto --std-c99 CFLAGS += -DCC2530_LAST_FLASH_BANK=$(HIGH_FLASH_BANK) CFLAGS += --fomit-frame-pointer +### Disable warning 110 (EVELYN the modified dog) and 126 (unreachable code) +CFLAGS += --disable-warning 110 --disable-warning 126 + LDFLAGS += --model-$(MEMORY_MODEL) --stack-auto --out-fmt-ihx LDFLAGS += --xram-loc 0x0000 --xram-size 0x1F00 LDFLAGS += --code-loc $(START_ADDR) --code-size $(CODE_SIZE) From 460d5bcb5dc65eb47fa85f1a667483cc6b9d788f Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 16:05:48 +0100 Subject: [PATCH 14/16] Fix cc2530 UART1 init bug Fixes #286 --- cpu/cc253x/dev/uart1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/cc253x/dev/uart1.c b/cpu/cc253x/dev/uart1.c index 8b3006c99..fd5c69536 100644 --- a/cpu/cc253x/dev/uart1.c +++ b/cpu/cc253x/dev/uart1.c @@ -55,7 +55,7 @@ uart1_init() #endif U1CSR = UCSR_MODE; /* UART mode */ - U1UCR = 0x80; /* Flush */ + U1UCR |= 0x80; /* Flush */ UART1_RX_INT(1); U0DBUF = 0; From 4f1485e238fa16934d91b386c9842fb1f5fd3c3a Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 16:38:12 +0100 Subject: [PATCH 15/16] Remove the second 6LoWPAN context from Sensinode This context was once used in an in-house testbed and is not required upstream --- platform/sensinode/contiki-conf.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/platform/sensinode/contiki-conf.h b/platform/sensinode/contiki-conf.h index e14a46c08..f327b3ee2 100644 --- a/platform/sensinode/contiki-conf.h +++ b/platform/sensinode/contiki-conf.h @@ -253,7 +253,7 @@ #define SICSLOWPAN_CONF_MAXAGE 8 /* Define our IPv6 prefixes/contexts here */ -#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 2 +#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 #define SICSLOWPAN_CONF_ADDR_CONTEXT_0 { \ addr_contexts[0].prefix[0] = 0x20; \ addr_contexts[0].prefix[1] = 0x01; \ @@ -264,16 +264,6 @@ addr_contexts[0].prefix[6] = 0x64; \ addr_contexts[0].prefix[7] = 0x53; \ } -#define SICSLOWPAN_CONF_ADDR_CONTEXT_1 { \ - addr_contexts[1].prefix[0] = 0x20; \ - addr_contexts[1].prefix[1] = 0x01; \ - addr_contexts[1].prefix[2] = 0x06; \ - addr_contexts[1].prefix[3] = 0x30; \ - addr_contexts[1].prefix[4] = 0x03; \ - addr_contexts[1].prefix[5] = 0x01; \ - addr_contexts[1].prefix[6] = 0x11; \ - addr_contexts[1].prefix[7] = 0x00; \ -} #define MAC_CONF_CHANNEL_CHECK_RATE 8 #ifndef QUEUEBUF_CONF_NUM From d7c796f65fb66912aa022695a308e36c302a2bd7 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Fri, 9 Aug 2013 16:40:28 +0100 Subject: [PATCH 16/16] Decrease Sensinode example code size --- examples/sensinode/sensors-ipv6/project-conf.h | 3 ++- examples/sensinode/udp-ipv6/project-conf.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/sensinode/sensors-ipv6/project-conf.h b/examples/sensinode/sensors-ipv6/project-conf.h index baa6edfc4..053f48d85 100644 --- a/examples/sensinode/sensors-ipv6/project-conf.h +++ b/examples/sensinode/sensors-ipv6/project-conf.h @@ -46,6 +46,7 @@ #define BUTTON_SENSOR_CONF_ON 1 #define ADC_SENSOR_CONF_ON 1 -#define LPM_CONF_MODE 1 +#define LPM_CONF_MODE 0 +#define VIZTOOL_CONF_ON 0 #endif /* PROJECT_CONF_H_ */ diff --git a/examples/sensinode/udp-ipv6/project-conf.h b/examples/sensinode/udp-ipv6/project-conf.h index 17dd8fe8b..4e74d406e 100644 --- a/examples/sensinode/udp-ipv6/project-conf.h +++ b/examples/sensinode/udp-ipv6/project-conf.h @@ -46,5 +46,6 @@ #define BUTTON_SENSOR_CONF_ON 1 #define RIMESTATS_CONF_ENABLED 1 +#define VIZTOOL_CONF_ON 0 #endif /* PROJECT_CONF_H_ */