Skip to content

Commit 88d7960

Browse files
authoredApr 26, 2019
Merge branch 'develop' into bugfix/build/include-platform-twice
2 parents dd0fd3c + 6a3744d commit 88d7960

16 files changed

+91
-17
lines changed
 

‎Makefile.gcc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- makefile -*-
2+
#
3+
# GCC specific definitions and actions
4+
#
5+
6+
GCC_MAJOR_VERSION := $(shell $(CC) -v 2>&1 | grep "gcc version" | cut -b 13)
7+
GCC_MINOR_VERSION := $(shell $(CC) -v 2>&1 | grep "gcc version" | cut -b 15)
8+
9+
# Warn if using version 6.3.x of arm-none-eabi-gcc
10+
ifeq ("$(CC)","arm-none-eabi-gcc")
11+
ifeq (6,$(GCC_MAJOR_VERSION))
12+
ifeq (3,$(GCC_MINOR_VERSION))
13+
$(warning Warning: you're using a version of $(CC) that may create broken Contiki-NG executables.)
14+
$(warning We recommend to upgrade or downgrade your toolchain.)
15+
endif
16+
endif
17+
endif
18+
19+
# Warn if using 4.6.x or older msp430-gcc
20+
ifeq ("$(CC)","msp430-gcc")
21+
ifeq ($(shell test $(GCC_MAJOR_VERSION) -lt 5; echo $$?),0)
22+
ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 7; echo $$?),0)
23+
$(warning Warning: you're using an old version of $(CC).)
24+
$(warning Upgrade to 4.7.x is recommended for extended memory support and bugfixes.)
25+
endif
26+
endif
27+
endif

‎Makefile.include

+3
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ ifeq ($(findstring $(TARGET),native cooja),)
469469
include $(CONTIKI)/Makefile.embedded
470470
endif
471471

472+
### Include Makefile.gcc for GCC specific definitions and actions
473+
include $(CONTIKI)/Makefile.gcc
474+
472475
# Don't treat $(BUILD_DIR_BOARD)/%.$(TARGET) and $(TARGET) as intermediate
473476
# files because for many platforms they are in fact the primary target.
474477
.PRECIOUS: $(BUILD_DIR_BOARD)/%.$(TARGET) %.$(TARGET)

‎arch/cpu/cc26x0-cc13x0/Makefile.cc26x0-cc13x0

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ else
9797
endif
9898

9999
### For the login etc targets
100-
BAUDRATE = 115200
100+
BAUDRATE ?= 115200

‎arch/platform/zoul/Makefile.zoul

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CFLAGS += -DDATE="\"`date +"%02u %02d %02m %02y %02H %02M %02S"`\""
2424

2525
### Configure the build for the board and pull in board-specific sources
2626
CONTIKI_TARGET_DIRS += . dev
27-
CONTIKI_TARGET_DIRS += . $(BOARD)
27+
CONTIKI_TARGET_DIRS += $(BOARD)
2828
PLATFORM_ROOT_DIR = $(ARCH_PATH)/platform/$(TARGET)
2929

3030
### Include the board dir if one exists
@@ -86,5 +86,5 @@ zoul-motes:
8686
@echo $(MOTES)
8787

8888
### For the login etc targets
89-
BAUDRATE = 115200
89+
BAUDRATE ?= 115200
9090
PORT = $(USBDEVPREFIX)$(firstword $(MOTES))

‎examples/sensniff/Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ include $(CONTIKI)/Makefile.identify-target
1010

1111
all: $(CONTIKI_PROJECT)
1212

13+
# Disable all networking layer 3 upwards
14+
MAKE_NET=MAKE_NET_NULLNET
15+
1316
# use a custom MAC driver: sensniff_mac_driver
1417
MAKE_MAC = MAKE_MAC_OTHER
15-
include $(CONTIKI)/Makefile.include
1618

1719
PYTHON ?= python
1820
SENSNIFF = $(CONTIKI)/tools/sensniff/sensniff.py
@@ -27,6 +29,8 @@ ifneq ($(PORT),)
2729
SENSNIFF_FLAGS += -d $(PORT)
2830
endif
2931

32+
include $(CONTIKI)/Makefile.include
33+
3034
sniff:
3135
ifeq ($(wildcard $(SENSNIFF)), )
3236
$(error Could not find the sensniff script. Did you run 'git submodule update --init' ?")

‎examples/sensniff/sensniff-mac.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,19 @@ init(void)
6969
on();
7070
}
7171
/*---------------------------------------------------------------------------*/
72+
static int
73+
max_payload(void)
74+
{
75+
return 0;
76+
}
77+
/*---------------------------------------------------------------------------*/
7278
const struct mac_driver sensniff_mac_driver = {
7379
"sensniff-rdc",
7480
init,
7581
send,
7682
input,
7783
on,
78-
off
84+
off,
85+
max_payload,
7986
};
8087
/*---------------------------------------------------------------------------*/

‎tests/07-simulation-base/15-cooja-multicast-11-hops-rollt-tm.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<identifier>mtype612</identifier>
2525
<description>Root/sender</description>
2626
<source>[CONTIKI_DIR]/examples/multicast/root.c</source>
27-
<commands>make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM</commands>
27+
<commands>make TARGET=cooja clean
28+
make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ROLL_TM</commands>
2829
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
2930
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3031
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/07-simulation-base/16-cooja-multicast-11-hops-smrf.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<identifier>mtype612</identifier>
2525
<description>Root/sender</description>
2626
<source>[CONTIKI_DIR]/examples/multicast/root.c</source>
27-
<commands>make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF</commands>
27+
<commands>make TARGET=cooja clean
28+
make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_SMRF</commands>
2829
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
2930
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3031
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/07-simulation-base/17-cooja-multicast-11-hops-esmrf.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<identifier>mtype612</identifier>
2525
<description>Root/sender</description>
2626
<source>[CONTIKI_DIR]/examples/multicast/root.c</source>
27-
<commands>make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF</commands>
27+
<commands>make TARGET=cooja clean
28+
make -j root.cooja TARGET=cooja DEFINES=UIP_MCAST6_CONF_ENGINE=UIP_MCAST6_ENGINE_ESMRF</commands>
2829
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
2930
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3031
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/07-simulation-base/18-cooja-multicast-31-hops.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<identifier>mtype816</identifier>
2525
<description>Root/sender</description>
2626
<source>[CONTIKI_DIR]/examples/multicast/root.c</source>
27-
<commands>make -j root.cooja TARGET=cooja</commands>
27+
<commands>make TARGET=cooja clean
28+
make -j root.cooja TARGET=cooja</commands>
2829
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
2930
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3031
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/08-native-runs/02-mqtt-client.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sleep 2
2828

2929
# Starting Contiki-NG native node
3030
echo "Starting native node"
31-
make -C $CODE_DIR TARGET=native \
31+
make -C $CODE_DIR -B TARGET=native \
3232
DEFINES=MQTT_CLIENT_CONF_ORG_ID=\\\"travis-test\\\",MQTT_CLIENT_CONF_LOG_LEVEL=LOG_LEVEL_DBG \
3333
> make.log 2> make.err
3434
sudo $CODE_DIR/$CODE.native > $CLIENT_LOG 2> $CLIENT_ERR &

‎tests/13-ieee802154/code-6tisch/common.c

+30-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#include "lib/simEnvChange.h"
3939
#include "sys/cooja_mt.h"
4040

41+
#define TEST_MAC_MAX_PAYLOAD_LEN 100
42+
4143
static uint8_t send_is_called;
4244

4345
void
@@ -73,11 +75,36 @@ send(mac_callback_t sent_callback, void *ptr)
7375
send_is_called = 1;
7476
}
7577

78+
static void
79+
input(void)
80+
{
81+
/* do nothing */
82+
}
83+
84+
static int
85+
on(void)
86+
{
87+
return 1; /* always on */
88+
}
89+
90+
static int
91+
off(void)
92+
{
93+
return 0; /* never be turned off */
94+
}
95+
96+
static int
97+
max_payload(void)
98+
{
99+
return TEST_MAC_MAX_PAYLOAD_LEN;
100+
}
101+
76102
const struct mac_driver test_mac_driver = {
77103
"Test MAC",
78104
init,
79105
send,
80-
NULL,
81-
NULL,
82-
NULL
106+
input,
107+
on,
108+
off,
109+
max_payload,
83110
};

‎tests/14-rpl-lite/02-rpl-root-reboot-2.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<identifier>mtype34</identifier>
2626
<description>mote</description>
2727
<source>[CONTIKI_DIR]/examples/libs/shell/example.c</source>
28-
<commands>make example.cooja TARGET=cooja MAKE_ROUTING=MAKE_ROUTING_RPL_LITE -j</commands>
28+
<commands>make TARGET=cooja clean
29+
make example.cooja TARGET=cooja MAKE_ROUTING=MAKE_ROUTING_RPL_LITE -j</commands>
2930
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
3031
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3132
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/15-rpl-classic/02-rpl-root-reboot-2.csc

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
<identifier>mtype512</identifier>
2626
<description>mote</description>
2727
<source>[CONTIKI_DIR]/examples/libs/shell/example.c</source>
28-
<commands>make example.cooja TARGET=cooja MAKE_ROUTING=MAKE_ROUTING_RPL_CLASSIC -j</commands>
28+
<commands>make TARGET=cooja clean
29+
make example.cooja TARGET=cooja MAKE_ROUTING=MAKE_ROUTING_RPL_CLASSIC -j</commands>
2930
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
3031
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
3132
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>

‎tests/17-tun-rpl-br/test-native-border-router.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sleep 20
3030

3131
# Connect to the simulation
3232
echo "Starting native border-router"
33-
nohup make -C $CONTIKI/examples/rpl-border-router/ connect-router-cooja TARGET=native >> $BASENAME.nbr.log 2>&1 &
33+
nohup make -C $CONTIKI/examples/rpl-border-router/ -B connect-router-cooja TARGET=native >> $BASENAME.nbr.log 2>&1 &
3434
MPID=$!
3535
printf "Waiting for network formation (%d seconds)\n" "$WAIT_TIME"
3636
sleep $WAIT_TIME

‎tools/sensniff

0 commit comments

Comments
 (0)
Please sign in to comment.