From bfb4f9537bd4a25087cdde08c2cc4ec0e619ec48 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Feb 2018 08:20:46 -0800 Subject: [PATCH 01/14] 6p-packet example: use MAC address instead of node_id to hardcode coordinator --- examples/6tisch/6p-packet/sixp-node.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/6tisch/6p-packet/sixp-node.c b/examples/6tisch/6p-packet/sixp-node.c index d911701bc..43cabbe29 100644 --- a/examples/6tisch/6p-packet/sixp-node.c +++ b/examples/6tisch/6p-packet/sixp-node.c @@ -30,11 +30,13 @@ #include #include -#include #include #include #include +/* Hard-coded MAC address of the TSCH coordinator */ +static linkaddr_t coordinator_addr = {{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}; + extern const sixtop_sf_t test_sf; extern int test_sf_start(const linkaddr_t *addr); @@ -49,7 +51,7 @@ PROCESS_THREAD(sixp_node_process, ev, data) sixtop_add_sf(&test_sf); - if(node_id == COORDINATOR_NODE_ID) { + if(linkaddr_cmp(&coordinator_addr, &linkaddr_node_addr)) { tsch_set_coordinator(1); assert(test_sf_start(NULL) == 0); } else { From 0290692815c2ece465e97f0c6a8a13abb71b63c7 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Feb 2018 08:35:53 -0800 Subject: [PATCH 02/14] ipv6-hooks example: added missing include --- examples/ipv6-hooks/ipv6-hooks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipv6-hooks/ipv6-hooks.c b/examples/ipv6-hooks/ipv6-hooks.c index eafc45654..d3ca8861c 100644 --- a/examples/ipv6-hooks/ipv6-hooks.c +++ b/examples/ipv6-hooks/ipv6-hooks.c @@ -4,6 +4,7 @@ #include "net/netstack.h" #include "net/ipv6/simple-udp.h" #include "net/ipv6/uipbuf.h" +#include "net/ipv6/uip-ds6.h" #include "sys/log.h" #define LOG_MODULE "App" From 6ced7e506fdcb4d456a1ad5f06fcce3bc42f1859 Mon Sep 17 00:00:00 2001 From: Atis Elsts Date: Tue, 27 Feb 2018 17:34:43 +0000 Subject: [PATCH 03/14] IPSO objects: include dev/leds.h --- examples/ipso-objects/example-ipso-objects.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipso-objects/example-ipso-objects.c b/examples/ipso-objects/example-ipso-objects.c index ee4b992e4..aa565603b 100644 --- a/examples/ipso-objects/example-ipso-objects.c +++ b/examples/ipso-objects/example-ipso-objects.c @@ -37,6 +37,7 @@ */ #include "contiki.h" +#include "dev/leds.h" #include "services/lwm2m/lwm2m-engine.h" #include "services/lwm2m/lwm2m-rd-client.h" #include "services/lwm2m/lwm2m-device.h" From a64d5e0c18c00aba4ddf5dc7b8f1f03a08ad782b Mon Sep 17 00:00:00 2001 From: Atis Elsts Date: Tue, 27 Feb 2018 17:43:06 +0000 Subject: [PATCH 04/14] Include strings.h for strncasecmp() --- os/storage/antelope/aql-lexer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/os/storage/antelope/aql-lexer.c b/os/storage/antelope/aql-lexer.c index cad604efb..4bdefecf2 100644 --- a/os/storage/antelope/aql-lexer.c +++ b/os/storage/antelope/aql-lexer.c @@ -42,6 +42,7 @@ #include #include #include +#include struct keyword { char *string; From 3a1b830f9262d689dedcd5541279c576db30258b Mon Sep 17 00:00:00 2001 From: Atis Elsts Date: Tue, 27 Feb 2018 17:57:34 +0000 Subject: [PATCH 05/14] MQTT demo: add missing include --- examples/platform-specific/cc2538-common/mqtt-demo/mqtt-demo.c | 1 + examples/platform-specific/nrf52dk/mqtt-demo/mqtt-demo.c | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/platform-specific/cc2538-common/mqtt-demo/mqtt-demo.c b/examples/platform-specific/cc2538-common/mqtt-demo/mqtt-demo.c index c28b5c741..b818b88ca 100644 --- a/examples/platform-specific/cc2538-common/mqtt-demo/mqtt-demo.c +++ b/examples/platform-specific/cc2538-common/mqtt-demo/mqtt-demo.c @@ -55,6 +55,7 @@ #include "dev/cc2538-sensors.h" #include +#include /*---------------------------------------------------------------------------*/ /* * IBM server: messaging.quickstart.internetofthings.ibmcloud.com diff --git a/examples/platform-specific/nrf52dk/mqtt-demo/mqtt-demo.c b/examples/platform-specific/nrf52dk/mqtt-demo/mqtt-demo.c index 80339a4ad..6fa071617 100644 --- a/examples/platform-specific/nrf52dk/mqtt-demo/mqtt-demo.c +++ b/examples/platform-specific/nrf52dk/mqtt-demo/mqtt-demo.c @@ -55,6 +55,7 @@ #include "dev/leds.h" #include +#include /*---------------------------------------------------------------------------*/ /* * IBM server: quickstart.messaging.internetofthings.ibmcloud.com From b2063a98152eac6f36ee00c567e03007dff4811f Mon Sep 17 00:00:00 2001 From: Atis Elsts Date: Tue, 27 Feb 2018 18:05:49 +0000 Subject: [PATCH 06/14] Zoul: test-servo.c was defined as project multiple times --- examples/platform-specific/zoul/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform-specific/zoul/Makefile b/examples/platform-specific/zoul/Makefile index bc018f171..3b8a3a751 100644 --- a/examples/platform-specific/zoul/Makefile +++ b/examples/platform-specific/zoul/Makefile @@ -3,7 +3,7 @@ CONTIKI_PROJECT += test-bmp085-bmp180 test-motion test-rotation-sensor CONTIKI_PROJECT += test-grove-light-sensor test-grove-loudness-sensor CONTIKI_PROJECT += test-weather-meter test-grove-gyro test-lcd test-iaq CONTIKI_PROJECT += test-pm10-sensor test-vac-sensor test-aac-sensor -CONTIKI_PROJECT += test-zonik test-dht22.c test-ac-dimmer.c test-servo.c +CONTIKI_PROJECT += test-zonik test-dht22.c test-ac-dimmer.c CONTIKI_PROJECT += test-bme280 CONTIKI_TARGET_SOURCEFILES += tsl256x.c sht25.c bmpx8x.c motion-sensor.c From b321e3e11a044af7f116bf2032b546ce3f6ec80d Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Feb 2018 12:32:41 -0800 Subject: [PATCH 07/14] Zoul at-test example: added missing include --- examples/platform-specific/zoul/at-test/at-master-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/platform-specific/zoul/at-test/at-master-test.c b/examples/platform-specific/zoul/at-test/at-master-test.c index 012010c87..b7a1acddc 100644 --- a/examples/platform-specific/zoul/at-test/at-master-test.c +++ b/examples/platform-specific/zoul/at-test/at-master-test.c @@ -52,6 +52,7 @@ #include "dev/ioc.h" #include "lib/list.h" #include "dev/sha256.h" +#include "net/linkaddr.h" #include #include #include From a2262786b1ca3bc9dae8cfdaa342a85a076e16b6 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Feb 2018 12:34:58 -0800 Subject: [PATCH 08/14] Zoul platform.c: removing leftover PRINTF --- arch/platform/zoul/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/platform/zoul/platform.c b/arch/platform/zoul/platform.c index f71c9e46a..4e5c7cc39 100644 --- a/arch/platform/zoul/platform.c +++ b/arch/platform/zoul/platform.c @@ -124,7 +124,7 @@ rtc_init(void) */ /* Get the system date in the following format: wd dd mm yy hh mm ss */ - PRINTF("Setting RTC from system date: %s\n", DATE); + LOG_INFO("Setting RTC from system date: %s\n", DATE); /* Configure the RTC with the current values */ td.weekdays = (uint8_t)strtol(DATE, &next, 10); @@ -149,7 +149,7 @@ rtc_init(void) /* Set the time and date */ if(rtcc_set_time_date(&td) == AB08_ERROR) { - PRINTF("Failed to set time and date\n"); + LOG_INFO("Failed to set time and date\n"); } #endif #endif From 635d8d78f7920a9c54ab0a32e3c5851bbed06d2f Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 27 Feb 2018 12:35:58 -0800 Subject: [PATCH 09/14] Zoul platform.c: include stdlib.h --- arch/platform/zoul/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/platform/zoul/platform.c b/arch/platform/zoul/platform.c index 4e5c7cc39..48e90cdfe 100644 --- a/arch/platform/zoul/platform.c +++ b/arch/platform/zoul/platform.c @@ -69,6 +69,7 @@ #include #include #include +#include /*---------------------------------------------------------------------------*/ /* Log configuration */ #include "sys/log.h" From c4f7d0f147f431d0553c867bb4447ad98ca656d7 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 27 Feb 2018 23:06:23 +0000 Subject: [PATCH 10/14] Fix Zoul at-test example Add missing include and fix the CONTIKI path in the makefile --- examples/platform-specific/zoul/at-test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform-specific/zoul/at-test/Makefile b/examples/platform-specific/zoul/at-test/Makefile index 8715c949f..04d282aaa 100644 --- a/examples/platform-specific/zoul/at-test/Makefile +++ b/examples/platform-specific/zoul/at-test/Makefile @@ -2,5 +2,5 @@ CONTIKI_PROJECT = at-master-test MODULES = os/services/at-master all: $(CONTIKI_PROJECT) -CONTIKI = ../../.. +CONTIKI = ../../../.. include $(CONTIKI)/Makefile.include From 6004084785259526dc75ab6dfd1a71a6d1fa9f1e Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 27 Feb 2018 23:05:00 +0000 Subject: [PATCH 11/14] Fix Zoul build when RTCC is enabled --- arch/platform/zoul/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/platform/zoul/platform.c b/arch/platform/zoul/platform.c index 48e90cdfe..4cf503162 100644 --- a/arch/platform/zoul/platform.c +++ b/arch/platform/zoul/platform.c @@ -150,7 +150,7 @@ rtc_init(void) /* Set the time and date */ if(rtcc_set_time_date(&td) == AB08_ERROR) { - LOG_INFO("Failed to set time and date\n"); + LOG_ERR("Failed to set time and date\n"); } #endif #endif From f22b54ae9fbf9b2886cc12670f0be433b1c93ae1 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 27 Feb 2018 23:16:24 +0000 Subject: [PATCH 12/14] Update Zoul/Orion example Makefile.target to specify the board --- .../platform-specific/zoul/orion/ip64-router/Makefile.target | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/platform-specific/zoul/orion/ip64-router/Makefile.target b/examples/platform-specific/zoul/orion/ip64-router/Makefile.target index 75430a6e4..420fc52cc 100644 --- a/examples/platform-specific/zoul/orion/ip64-router/Makefile.target +++ b/examples/platform-specific/zoul/orion/ip64-router/Makefile.target @@ -1 +1,2 @@ TARGET = zoul +BOARD = orion From bd73649eac6a9c22df9998c5ac66dfe643b8723d Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 27 Feb 2018 23:04:39 +0000 Subject: [PATCH 13/14] Update Zoul rev-b Makefile to specify the BOARD The examples in this directory are only meant for BOARD remote-revb --- examples/platform-specific/zoul/rev-b/Makefile.target | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/platform-specific/zoul/rev-b/Makefile.target b/examples/platform-specific/zoul/rev-b/Makefile.target index 75430a6e4..cb458a6d9 100644 --- a/examples/platform-specific/zoul/rev-b/Makefile.target +++ b/examples/platform-specific/zoul/rev-b/Makefile.target @@ -1 +1,2 @@ TARGET = zoul +BOARD = remote-revb From b632064f3d0be57d7333c1838b91c7f75f887e94 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 27 Feb 2018 23:11:59 +0000 Subject: [PATCH 14/14] Compile-test zoul examples --- tests/03-compile-arm-ports-02/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/03-compile-arm-ports-02/Makefile b/tests/03-compile-arm-ports-02/Makefile index 454c5d161..6aca008db 100644 --- a/tests/03-compile-arm-ports-02/Makefile +++ b/tests/03-compile-arm-ports-02/Makefile @@ -8,6 +8,10 @@ platform-specific/cc2538-common/mqtt-demo/zoul \ platform-specific/cc2538-common/crypto/zoul \ platform-specific/cc2538-common/pka/zoul \ platform-specific/zoul/orion/ip64-router/zoul:BOARD=orion \ +platform-specific/zoul/rev-b/zoul:BOARD=remote-revb \ +platform-specific/zoul/at-test/zoul \ +platform-specific/zoul/rtcc/zoul \ +platform-specific/zoul/zoul \ coap/zoul \ ipso-objects/zoul \ ipso-objects/zoul:MAKE_WITH_DTLS=1 \