Skip to content

Commit 7b076e4

Browse files
authored
Merge pull request contiki-ng#749 from contiki-ng/release-4.2
Release v4.2
2 parents 7da2787 + 98f35fe commit 7b076e4

File tree

637 files changed

+54456
-5049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

637 files changed

+54456
-5049
lines changed

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
*.ihex
1313
*.pyc
1414
*~
15-
obj_*
15+
build/*
1616
Makefile.target
1717
Makefile.*.defines
1818
tools/doxygen/html
19+
tools/readthedocs/_build
1920
patches-*
20-
tools/tunslip
21-
tools/tunslip6
21+
tools/serial-io/tunslip6
22+
tools/serial-io/serialdump
23+
serialdump-*
2224
build
2325
tools/coffee-manager/build/
2426
tools/coffee-manager/coffee.jar
@@ -31,6 +33,7 @@ COOJA.testlog
3133
*.native
3234
*.nrf52dk
3335
*.openmote-cc2538
36+
*.simplelink
3437
*.sky
3538
*.firmware
3639
*.srf06-cc26xx
@@ -58,6 +61,8 @@ COOJA.testlog
5861
*.err
5962
summary
6063
tests/[0-9][0-9]-*/org/
64+
tests/18-coap-lwm2m/Californium.properties
65+
tests/18-coap-lwm2m/leshan-server-demo*.jar
6166

6267
# x86 UEFI files
6368
cpu/x86/uefi/Makefile.uefi

.gitmodules

+9
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@
1919
[submodule "tests/18-coap-lwm2m/example-lwm2m-standalone"]
2020
path = tests/18-coap-lwm2m/example-lwm2m-standalone
2121
url = https://github.com/contiki-ng/example-lwm2m-standalone.git
22+
[submodule "tools/motelist"]
23+
path = tools/motelist
24+
url = https://github.com/contiki-ng/motelist
25+
[submodule "arch/cpu/simplelink-cc13xx-cc26xx/lib/coresdk_cc13xx_cc26xx"]
26+
path = arch/cpu/simplelink-cc13xx-cc26xx/lib/coresdk_cc13xx_cc26xx
27+
url = https://github.com/contiki-ng/coresdk_cc13xx_cc26xx.git
28+
[submodule "arch/cpu/cc26xx-cc13xx/lib/cc2640r2-sdk"]
29+
path = arch/cpu/cc26xx-cc13xx/lib/cc2640r2-sdk
30+
url = https://github.com/contiki-ng/cc2640r2-sdk.git

.travis.yml

+72-24
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,83 @@
11
# Setup environment for Docker
22
language: generic
33
services: docker
4-
54
notifications:
6-
- email: false
5+
email: false
76

7+
# Environment setup before test script. Runs for each build
88
before_install:
9-
# Environment setup before test script
10-
- export CNG_HOST_PATH=`pwd`
11-
- export DOCKER_IMG='simonduq/contiki-ng:latest'
12-
- sudo chgrp -hR 1000 $CNG_HOST_PATH
13-
- docker pull $DOCKER_IMG
14-
- ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar
9+
# Check if anything has changed within the docker directory
10+
- DOCKER_CHANGED=`git diff --name-only $TRAVIS_COMMIT_RANGE -- tools/docker | wc -l`
11+
# If Docker directory has not changed, pull image from Dockerhub. Else, build
12+
# image from Dockerifle. This needs to be done for each job. Any build error
13+
# will count as Travis test failure. In case this updates develop, push new
14+
# image to Dockerhub (secure credentials only readable on bulids to
15+
# contiki-ng/contiki-ng branches, not forks or PRs)
16+
- >
17+
if [ $DOCKER_CHANGED == 0 ]; then
18+
echo "Docker image unchanged, pull from Dockerhub"
19+
docker pull $DOCKER_IMG;
20+
else
21+
echo "Docker image changed, build from Dockerfile"
22+
docker build tools/docker -t $DOCKER_IMG;
23+
if [ $? != 0 ]; then
24+
echo "Failed to build Docker image"
25+
exit 1
26+
fi
27+
if [ $TRAVIS_SECURE_ENV_VARS == true ] && [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == 'develop' ]; then
28+
echo "This build is for an update of branch develop. Push image to Dockerhub"
29+
echo $DOCKERHUB_PASSWD | docker login --username contiker --password-stdin
30+
docker push $DOCKER_IMG;
31+
fi
32+
fi
33+
# Build Cooja conditionally
34+
- if [ ${BUILD_COOJA:-false} = true ] ; then
35+
ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar ;
36+
fi
37+
38+
# Create a directory for out of tree tests and clone the test repo therein
39+
# The directory will need created unconditionally so we can always chgrp and
40+
# mount it, even if empty. Checkout a pre-defined version.
41+
- mkdir -p $OUT_OF_TREE_TEST_PATH
42+
- if [ ${TEST_NAME} = "out-of-tree-build" ] ; then
43+
git clone --depth 1 https://github.com/contiki-ng/out-of-tree-tests $OUT_OF_TREE_TEST_PATH &&
44+
cd $OUT_OF_TREE_TEST_PATH &&
45+
git checkout $OUT_OF_TREE_TEST_VER ;
46+
fi
47+
# Set permissions for Docker mount
48+
- sudo chgrp -hR 1000 $CNG_HOST_PATH $OUT_OF_TREE_TEST_PATH
1549

16-
script: # The test script for each build.
17-
- docker run --privileged -v $CNG_HOST_PATH:/home/user/contiki-ng -ti $DOCKER_IMG bash --login -c "make -C tests/??-$TEST_NAME";
50+
# The test script for each build
51+
script:
52+
- docker run --privileged -v $OUT_OF_TREE_TEST_PATH:/home/user/out-of-tree-tests -v $CNG_HOST_PATH:/home/user/contiki-ng -ti $DOCKER_IMG bash --login -c "make -C tests/??-$TEST_NAME";
1853
# Check outcome of the test
1954
- $CNG_HOST_PATH/tests/check-test.sh $CNG_HOST_PATH/tests/??-$TEST_NAME; exit $?;
2055

56+
# Environment variables
2157
env:
22-
# Parallel builds
23-
- TEST_NAME='compile-base'
24-
- TEST_NAME='compile-arm-ports-01'
25-
- TEST_NAME='compile-arm-ports-02'
26-
- TEST_NAME='rpl-lite'
27-
- TEST_NAME='rpl-classic'
28-
- TEST_NAME='tun-rpl-br'
29-
- TEST_NAME='coap-lwm2m'
30-
- TEST_NAME='simulation-base'
31-
- TEST_NAME='ieee802154'
32-
- TEST_NAME='compile-nxp-ports'
33-
- TEST_NAME='doxygen'
34-
- TEST_NAME='compile-tools'
35-
- TEST_NAME='native-runs'
58+
# Global environment variables, i.e., set for all builds
59+
global:
60+
- DOCKER_IMG='contiker/contiki-ng'
61+
- CNG_HOST_PATH=`pwd`
62+
- OUT_OF_TREE_TEST_PATH=$HOME/out-of-tree-tests
63+
- OUT_OF_TREE_TEST_VER=2869ae7
64+
# Encrypted environment variables.
65+
# Only available on builds of contiki-ng/contiki-ng branches, not PRs or forks.
66+
- secure: 0nrV5yjpT2kE19Hlm7t619Qbmyjx/G7bSUI1c+U3kZbyuxnRlASjVcDN5uPBoimIfGiBRI0nRq690BogAJt4EKwbC1Dy8kC1XD8mRtQ2AIZ6PHaUoG9iS5sBhFBQK0XkB83bwh6omRn/04O0uuX74ooSWT7fDrWxi/y5+0ysXK6gRtOhdrJ3FU5OkNVewX8NeCdx3pOWhMOtXWdFkMIi1XRdDnvMM5/hHlHMkdXXtaZQX9UsK3Q3DSjPRLZjKRiOlcx9MIg2ebh9ITmd2Du2p2q/LKtoutJckvhbKQPWcZi/B+1ZTSff0FHBIg+EYxf6TeFuia7XSTWH7sr2CDCCtcvSR9bB5yW6jdmGfa8Af8I1TCBuqoSUo0Re50BZBZF7COleEh+IojbjXn2CIDMg5rT4Sh3qcMGvFn9OW1cz5h5UNSOk7EIAXXPcI7Aloxh2sBo4/DrvvbfIsKrvxV9Fx4bdyNtR7dZ7xsoOw6L0zttC3K9naf3VAOeBAyjBiRwm0tWxJC/buhTsKlYrthhyUrwLtYAFL4UHcazvz57hY/cEzR2X6F//9Hp7HFoNtn1E36doX3ZfeI22yxHMo9SYW7O69C45wbhJ29lAA9XXbYVyGBKFkY8C1NCZ0Xckt9H8/Ow5Sz8HmW/NNBJCn0Fsx+jezdGc4ED5naugNbLAyNg=
67+
# Each line in the 'matrix' triggers a separate Travis build
68+
matrix:
69+
- TEST_NAME='compile-base'
70+
- TEST_NAME='compile-arm-ports-01'
71+
- TEST_NAME='compile-arm-ports-02'
72+
- TEST_NAME='rpl-lite' BUILD_COOJA=true
73+
- TEST_NAME='rpl-classic' BUILD_COOJA=true
74+
- TEST_NAME='tun-rpl-br' BUILD_COOJA=true
75+
- TEST_NAME='coap-lwm2m'
76+
- TEST_NAME='simulation-base' BUILD_COOJA=true
77+
- TEST_NAME='ieee802154' BUILD_COOJA=true
78+
- TEST_NAME='compile-nxp-ports'
79+
- TEST_NAME='documentation'
80+
- TEST_NAME='compile-tools'
81+
- TEST_NAME='native-runs'
82+
- TEST_NAME='ipv6' BUILD_COOJA=true
83+
- TEST_NAME='out-of-tree-build'

LICENSE.md

+28-39
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
1-
Contiki-NG is licensed under the 3-clause BSD license. This license gives
2-
everyone the right to use and distribute the code, either in binary or
3-
source code format, as long as the copyright license is retained in
4-
the source code.
1+
Copyright (c) (Year), (Name of copyright holder)
2+
All rights reserved.
53

6-
The copyright for different parts of the code is held by different
7-
people and organizations, but the code is licensed under the same type
8-
of license. The license text is:
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions
6+
are met:
97

10-
```
11-
/*
12-
* Copyright (c) (Year), (Name of copyright holder)
13-
* All rights reserved.
14-
*
15-
* Redistribution and use in source and binary forms, with or without
16-
* modification, are permitted provided that the following conditions
17-
* are met:
18-
* 1. Redistributions of source code must retain the above copyright
19-
* notice, this list of conditions and the following disclaimer.
20-
* 2. Redistributions in binary form must reproduce the above copyright
21-
* notice, this list of conditions and the following disclaimer in the
22-
* documentation and/or other materials provided with the distribution.
23-
*
24-
* 3. Neither the name of the copyright holder nor the names of its
25-
* contributors may be used to endorse or promote products derived
26-
* from this software without specific prior written permission.
27-
*
28-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29-
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31-
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32-
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33-
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37-
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39-
* OF THE POSSIBILITY OF SUCH DAMAGE.
40-
*/
41-
```
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived
17+
from this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23+
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30+
OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile.embedded

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This Makefile contains make variables and rules that are only applicable
2+
# to builds for embedded devices (i.e. excluding platforms native and cooja).
3+
# Future extensions to the build system that are of a similar nature (for
4+
# embedded devices only), can be achieved by extending this Makefile here.
5+
6+
###
7+
### Targets using the tools/serial-io
8+
###
9+
RLWRAPGOALS = login serialdump serialview
10+
11+
.PHONY: $(RLWRAPGOALS)
12+
13+
BAUDRATE ?= 115200
14+
SERIALDUMP_TIME_FMT ?=
15+
16+
ifeq ($(HOST_OS),Windows)
17+
SERIALDUMP = $(SERIAL_DUMP_BIN)
18+
else
19+
RLWRAP = $(notdir $(shell which rlwrap))
20+
ifeq ($(RLWRAP),)
21+
ifneq ($(filter $(RLWRAPGOALS),$(MAKECMDGOALS)),)
22+
$(info Running serialdump without rlwrap support.)
23+
$(info Consider installing rlwarp in order to be able to use command history)
24+
endif
25+
endif
26+
SERIALDUMP = $(RLWRAP) $(SERIAL_DUMP_BIN)
27+
endif
28+
29+
serialdump: $(SERIAL_DUMP_BIN)
30+
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT) | tee serialdump-`date +%Y%m%d-%H%M`
31+
32+
serialview: $(SERIAL_DUMP_BIN)
33+
$(SERIALDUMP) -b$(BAUDRATE) -T$(SERIALDUMP_TIME_FMT) $(PORT)
34+
35+
login: $(SERIAL_DUMP_BIN)
36+
$(SERIALDUMP) -b$(BAUDRATE) $(PORT)
37+
38+
###
39+
### Targets using tools/motelist
40+
###
41+
CONTIKI_NG_MOTELIST_DIR = $(TOOLS_DIR)/motelist
42+
CONTIKI_NG_MOTELIST = python $(CONTIKI_NG_MOTELIST_DIR)/motelist.py
43+
44+
.PHONY: motelist-all
45+
46+
motelist-all:
47+
$(CONTIKI_NG_MOTELIST)

Makefile.help

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
usage:
2+
@echo "Usage:"
3+
@echo " make [TARGET=(TARGET)] [BOARD=(BOARD)] [DEFINES=(DEFINES)] [PORT=(PORT)] [target]"
4+
@echo ""
5+
@echo "Typical usage:"
6+
@echo " make [TARGET=(TARGET)] [BOARD=(BOARD)] [all]"
7+
@echo ""
8+
@echo " Will build Contiki-NG firmware(s) from the current example dir"
9+
@echo " for platform TARGET, board BOARD."
10+
@echo ""
11+
@echo "Miscellaneous targets:"
12+
@echo " targets Prints list of supported platforms"
13+
@echo " boards Prints a list of supported boards for TARGET"
14+
@echo " savetarget Saves TARGET and BOARD for future invocations of make"
15+
@echo " savedefines Saves DEFINES for future invocations of make"
16+
@echo " clean Removes all compiled files for TARGET"
17+
@echo " distclean Removes all compiled files for all TARGETs"
18+
@echo " viewconf Prints Contiki-NG build configuration for TARGET"
19+
@echo " %.flashprof Shows a Flash/ROM profile of a given firmware (e.g. hello-world.flashprof)"
20+
@echo " %.ramprof Shows a RAM profile of a given firmware (e.g. hello-world.ramprof)"
21+
@echo " %.o Produces an object file from a given source file (e.g. hello-world.o)"
22+
@echo " %.e Produces the pre-processed version of a given source file (e.g. hello-world.e)"
23+
@echo " %.s Produces an assembly file from a given source file (e.g. hello-world.s)"
24+
@echo " login View the serial output of the device connected to PORT"
25+
@echo " serialview Same as login, but prepend serial output with a unix timestamp"
26+
@echo " serialdump same as serialview, but also save the output to a file"
27+
@echo " motelist-all Prints a list of connected devices"
28+
29+
help: usage

Makefile.identify-target

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# This Makefile can be used to identify the selected TARGET used for a
2+
# specific build. It can be included by example Makefiles that need to take
3+
# decisions based on TARGET. It is also automatically included by the
4+
# top-level Makefile.include.
5+
16
ifeq ($(TARGET),)
27
-include Makefile.target
38
ifeq ($(TARGET),)

0 commit comments

Comments
 (0)