Merge pull request #324 from atiselsts/bugfix/example-compilation

Fix building of examples
This commit is contained in:
George Oikonomou 2018-03-01 15:24:49 +00:00 committed by GitHub
commit 17806f3815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 21 additions and 6 deletions

View File

@ -69,6 +69,7 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* Log configuration */ /* Log configuration */
#include "sys/log.h" #include "sys/log.h"
@ -124,7 +125,7 @@ rtc_init(void)
*/ */
/* Get the system date in the following format: wd dd mm yy hh mm ss */ /* 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 */ /* Configure the RTC with the current values */
td.weekdays = (uint8_t)strtol(DATE, &next, 10); td.weekdays = (uint8_t)strtol(DATE, &next, 10);
@ -149,7 +150,7 @@ rtc_init(void)
/* Set the time and date */ /* Set the time and date */
if(rtcc_set_time_date(&td) == AB08_ERROR) { if(rtcc_set_time_date(&td) == AB08_ERROR) {
PRINTF("Failed to set time and date\n"); LOG_ERR("Failed to set time and date\n");
} }
#endif #endif
#endif #endif

View File

@ -30,11 +30,13 @@
#include <contiki.h> #include <contiki.h>
#include <lib/assert.h> #include <lib/assert.h>
#include <sys/node-id.h>
#include <net/mac/tsch/tsch.h> #include <net/mac/tsch/tsch.h>
#include <net/mac/tsch/tsch-queue.h> #include <net/mac/tsch/tsch-queue.h>
#include <net/mac/tsch/sixtop/sixtop.h> #include <net/mac/tsch/sixtop/sixtop.h>
/* 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 const sixtop_sf_t test_sf;
extern int test_sf_start(const linkaddr_t *addr); 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); sixtop_add_sf(&test_sf);
if(node_id == COORDINATOR_NODE_ID) { if(linkaddr_cmp(&coordinator_addr, &linkaddr_node_addr)) {
tsch_set_coordinator(1); tsch_set_coordinator(1);
assert(test_sf_start(NULL) == 0); assert(test_sf_start(NULL) == 0);
} else { } else {

View File

@ -37,6 +37,7 @@
*/ */
#include "contiki.h" #include "contiki.h"
#include "dev/leds.h"
#include "services/lwm2m/lwm2m-engine.h" #include "services/lwm2m/lwm2m-engine.h"
#include "services/lwm2m/lwm2m-rd-client.h" #include "services/lwm2m/lwm2m-rd-client.h"
#include "services/lwm2m/lwm2m-device.h" #include "services/lwm2m/lwm2m-device.h"

View File

@ -4,6 +4,7 @@
#include "net/netstack.h" #include "net/netstack.h"
#include "net/ipv6/simple-udp.h" #include "net/ipv6/simple-udp.h"
#include "net/ipv6/uipbuf.h" #include "net/ipv6/uipbuf.h"
#include "net/ipv6/uip-ds6.h"
#include "sys/log.h" #include "sys/log.h"
#define LOG_MODULE "App" #define LOG_MODULE "App"

View File

@ -55,6 +55,7 @@
#include "dev/cc2538-sensors.h" #include "dev/cc2538-sensors.h"
#include <string.h> #include <string.h>
#include <strings.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* /*
* IBM server: messaging.quickstart.internetofthings.ibmcloud.com * IBM server: messaging.quickstart.internetofthings.ibmcloud.com

View File

@ -55,6 +55,7 @@
#include "dev/leds.h" #include "dev/leds.h"
#include <string.h> #include <string.h>
#include <strings.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* /*
* IBM server: quickstart.messaging.internetofthings.ibmcloud.com * IBM server: quickstart.messaging.internetofthings.ibmcloud.com

View File

@ -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-grove-light-sensor test-grove-loudness-sensor
CONTIKI_PROJECT += test-weather-meter test-grove-gyro test-lcd test-iaq 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-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_PROJECT += test-bme280
CONTIKI_TARGET_SOURCEFILES += tsl256x.c sht25.c bmpx8x.c motion-sensor.c CONTIKI_TARGET_SOURCEFILES += tsl256x.c sht25.c bmpx8x.c motion-sensor.c

View File

@ -2,5 +2,5 @@ CONTIKI_PROJECT = at-master-test
MODULES = os/services/at-master MODULES = os/services/at-master
all: $(CONTIKI_PROJECT) all: $(CONTIKI_PROJECT)
CONTIKI = ../../.. CONTIKI = ../../../..
include $(CONTIKI)/Makefile.include include $(CONTIKI)/Makefile.include

View File

@ -52,6 +52,7 @@
#include "dev/ioc.h" #include "dev/ioc.h"
#include "lib/list.h" #include "lib/list.h"
#include "dev/sha256.h" #include "dev/sha256.h"
#include "net/linkaddr.h"
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1 +1,2 @@
TARGET = zoul TARGET = zoul
BOARD = orion

View File

@ -1 +1,2 @@
TARGET = zoul TARGET = zoul
BOARD = remote-revb

View File

@ -42,6 +42,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strings.h>
struct keyword { struct keyword {
char *string; char *string;

View File

@ -8,6 +8,10 @@ platform-specific/cc2538-common/mqtt-demo/zoul \
platform-specific/cc2538-common/crypto/zoul \ platform-specific/cc2538-common/crypto/zoul \
platform-specific/cc2538-common/pka/zoul \ platform-specific/cc2538-common/pka/zoul \
platform-specific/zoul/orion/ip64-router/zoul:BOARD=orion \ 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 \ coap/zoul \
ipso-objects/zoul \ ipso-objects/zoul \
ipso-objects/zoul:MAKE_WITH_DTLS=1 \ ipso-objects/zoul:MAKE_WITH_DTLS=1 \