Unverified Commit 7da27879 authored by Simon Duquennoy's avatar Simon Duquennoy Committed by GitHub
Browse files

Merge pull request #502 from contiki-ng/release-4.1

Release v4.1
parents 8602fb51 c9a9a27d
......@@ -7,11 +7,14 @@
*.elf
*.zip
*.d
*.o
*.e
*.ihex
*.pyc
*~
obj_*
Makefile.target
Makefile.*.defines
tools/doxygen/html
patches-*
tools/tunslip
......@@ -19,8 +22,6 @@ tools/tunslip6
build
tools/coffee-manager/build/
tools/coffee-manager/coffee.jar
tools/collect-view/build/
tools/collect-view/dist/
COOJA.testlog
# platform build artifacts
......@@ -31,6 +32,7 @@ COOJA.testlog
*.nrf52dk
*.openmote-cc2538
*.sky
*.firmware
*.srf06-cc26xx
*.zoul
......@@ -50,14 +52,11 @@ COOJA.testlog
#test artifacts
*.testlog
*.log.prog
*.report
summary
*.scriptlog
*.coojalog
*.summary
*.runerr
*.runlog
*.faillog
tests/[0-9][0-9]-*/report
*.err
summary
tests/[0-9][0-9]-*/org/
# x86 UEFI files
......
......@@ -13,3 +13,9 @@
[submodule "tools/cooja"]
path = tools/cooja
url = https://github.com/contiki-ng/cooja.git
[submodule "os/net/security/tinydtls"]
path = os/net/security/tinydtls
url = https://github.com/contiki-ng/tinydtls.git
[submodule "tests/18-coap-lwm2m/example-lwm2m-standalone"]
path = tests/18-coap-lwm2m/example-lwm2m-standalone
url = https://github.com/contiki-ng/example-lwm2m-standalone.git
# Workaround for the issue found in the stable image promoted on Dec 1, 2016.
# See https://github.com/travis-ci/travis-ci/issues/6928#issuecomment-264227708
group: deprecated
# Setup environment for Docker
language: generic
services: docker
notifications:
email: false
language: c #NOTE: this will set CC=gcc which might cause trouble
before_script:
- WGET="travis_retry wget --continue --tries=20 --waitretry=10 --retry-connrefused --no-dns-cache --timeout 300"
- sudo apt-get -qq update
- email: false
## Support building a binary that is identical to the CI
- echo -n "Contiki will be compiled with RELSTR=" ; git --git-dir .git describe --tags --always
## Install doxygen
- if [ ${BUILD_CATEGORY:-0} = doxygen ] ; then
sudo add-apt-repository ppa:libreoffice/ppa -y && sudo apt-get -qq update &&
sudo apt-get --no-install-suggests --no-install-recommends -qq install doxygen &&
doxygen --version ;
fi
## Install msp430 toolchain
- sudo apt-get -qq install lib32z1
- $WGET http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 &&
tar xjf mspgcc*.tar.bz2 -C /tmp/ &&
sudo cp -f -r /tmp/msp430/* /usr/local/ &&
rm -rf /tmp/msp430 mspgcc*.tar.bz2 &&
msp430-gcc --version
## Install 32-bit compatibility libraries
- sudo apt-get -qq install libc6:i386 libgcc1:i386 gcc-4.6-base:i386
libstdc++5:i386 libstdc++6:i386
## Install mainline ARM toolchain and srecord.
- if [ ${BUILD_ARCH:-0} = arm-aapcs ] ; then
sudo apt-get -qq install srecord &&
$WGET https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 &&
tar xjf gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 -C /tmp/ &&
sudo cp -f -r /tmp/gcc-arm-none-eabi-5_2-2015q4/* /usr/local/ &&
rm -rf /tmp/gcc-arm-none-eabi-* gcc-arm-none-eabi-*-linux.tar.bz2 &&
arm-none-eabi-gcc --version ;
fi
## Install NXP toolchain
- if [ ${BUILD_ARCH:-0} = jn516x ] ; then
$WGET http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 &&
$WGET http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part2.tar.bz2 &&
$WGET http://simonduq.github.io/resources/jn516x-sdk-4163-1416.tar.bz2 &&
mkdir /tmp/jn516x-sdk /tmp/ba-elf-gcc &&
tar xjf jn516x-sdk-*.tar.bz2 -C /tmp/jn516x-sdk &&
tar xjf ba-elf-gcc-*part1.tar.bz2 -C /tmp/ba-elf-gcc &&
tar xjf ba-elf-gcc-*part2.tar.bz2 -C /tmp/ba-elf-gcc &&
sudo cp -f -r /tmp/jn516x-sdk /usr/ &&
sudo cp -f -r /tmp/ba-elf-gcc /usr/ &&
export PATH=/usr/ba-elf-gcc/bin:$PATH &&
rm -rf /tmp/ba-elf-gcc* /tmp/jn516x-sdk* &&
ba-elf-gcc --version ;
fi
## Install mainline ARM toolchain and download nRF52 SDK
- if [ ${BUILD_ARCH:-0} = nrf52dk ] ; then
sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa &&
sudo apt-get -qq update &&
sudo apt-get -qq install gcc-arm-embedded srecord &&
arm-none-eabi-gcc --version &&
$WGET https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip &&
mkdir /tmp/nrf52-sdk &&
unzip nrf5_iot_sdk_3288530.zip -d /tmp/nrf52-sdk &&
export NRF52_SDK_ROOT=/tmp/nrf52-sdk ;
fi
## Compile cooja.jar only when it's going to be needed
- if [ ${BUILD_CATEGORY:-0} = sim ] ; then
java -version &&
ant -q -f tools/cooja/build.xml jar &&
sudo java -Xshare:dump -version ;
fi
script:
## tests/Makefile handles most of generic logic
- "make -C tests/??-$BUILD_TYPE RUNALL=true summary"
after_script:
## Print cooja test logs
- "[ ${BUILD_CATEGORY:-0} = sim ] && tail tests/??-$BUILD_TYPE/*.testlog"
## Print a basic summary
- "echo 'Summary:'; cat tests/??-$BUILD_TYPE/summary"
- "FAILS=`grep -c ' FAIL ' tests/??-$BUILD_TYPE/summary`"
## This will detect whether the build should pass or fail
- "test $FAILS -eq 0; exit $?"
before_install:
# Environment setup before test script
- export CNG_HOST_PATH=`pwd`
- export DOCKER_IMG='simonduq/contiki-ng:latest'
- sudo chgrp -hR 1000 $CNG_HOST_PATH
- docker pull $DOCKER_IMG
- ant -q -f $CNG_HOST_PATH/tools/cooja/build.xml jar
script: # The test script for each build.
- docker run --privileged -v $CNG_HOST_PATH:/home/user/contiki-ng -ti $DOCKER_IMG bash --login -c "make -C tests/??-$TEST_NAME";
# Check outcome of the test
- $CNG_HOST_PATH/tests/check-test.sh $CNG_HOST_PATH/tests/??-$TEST_NAME; exit $?;
env:
## This magically kick-off parallel jobs for each of the for the sets
## of environment variable defined below
- BUILD_TYPE='doxygen' BUILD_CATEGORY='doxygen'
- BUILD_TYPE='compile-base' BUILD_CATEGORY='compile'
- BUILD_TYPE='compile-arm-ports' BUILD_CATEGORY='compile' BUILD_ARCH='arm-aapcs'
- BUILD_TYPE='compile-nxp-ports' BUILD_CATEGORY='compile' BUILD_ARCH='jn516x'
- BUILD_TYPE='compile-nrf52-ports' BUILD_CATEGORY='compile' BUILD_ARCH='nrf52dk'
- BUILD_TYPE='compile-tools' BUILD_CATEGORY='compile'
- BUILD_TYPE='rpl-lite' BUILD_CATEGORY='sim'
- BUILD_TYPE='rpl-classic' BUILD_CATEGORY='sim'
- BUILD_TYPE='ipv6' BUILD_CATEGORY='sim'
- BUILD_TYPE='nullnet' BUILD_CATEGORY='sim'
- BUILD_TYPE='base' BUILD_CATEGORY='sim'
- BUILD_TYPE='ieee802154' BUILD_CATEGORY='sim'
- BUILD_TYPE='6tisch' BUILD_CATEGORY='sim'
# Parallel builds
- TEST_NAME='compile-base'
- TEST_NAME='compile-arm-ports-01'
- TEST_NAME='compile-arm-ports-02'
- TEST_NAME='rpl-lite'
- TEST_NAME='rpl-classic'
- TEST_NAME='tun-rpl-br'
- TEST_NAME='coap-lwm2m'
- TEST_NAME='simulation-base'
- TEST_NAME='ieee802154'
- TEST_NAME='compile-nxp-ports'
- TEST_NAME='doxygen'
- TEST_NAME='compile-tools'
- TEST_NAME='native-runs'
Contiki is licensed under the 3-clause BSD license. This license gives
Contiki-NG is licensed under the 3-clause BSD license. This license gives
everyone the right to use and distribute the code, either in binary or
source code format, as long as the copyright license is retained in
the source code.
......
......@@ -8,7 +8,9 @@ endif
# Setting this option is also important for tests on Cooja motes to check for warnings.
WERROR ?= 1
include $(CONTIKI)/Makefile.identify-target
include $(CONTIKI)/Makefile.identify-target
CONTIKI_NG_TARGET_LIB = contiki-ng-$(TARGET).a
ifeq ($(DEFINES),)
-include Makefile.$(TARGET).defines
......@@ -40,9 +42,11 @@ LOWERCASE = -abcdefghijklmnopqrstuvwxyz/
UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ_
TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1
CFLAGS += -DCONTIKI_TARGET_STRING=\"$(TARGET)\"
ifneq ($(BOARD),)
TARGET_BOARD_UPPERCASE := ${strip ${shell echo $(BOARD) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
CFLAGS += -DCONTIKI_BOARD_$(TARGET_BOARD_UPPERCASE)=1
CFLAGS += -DCONTIKI_BOARD_STRING=\"$(BOARD)\"
endif
MODULES += os os/sys os/dev os/lib os/services
......@@ -52,12 +56,17 @@ ifneq ("$(wildcard project-conf.h)","")
CFLAGS += -DPROJECT_CONF_PATH=\"project-conf.h\"
endif
MODULES += os os/net os/net/mac os/storage
MODULES += os os/net os/net/mac os/net/mac/framer os/net/routing os/storage
oname = ${patsubst %.c,%.o,${patsubst %.S,%.o,$(1)}}
define oname
${patsubst %.c,%.o, \
${patsubst %.S,%.o, \
${patsubst %.s,%.o, \
$(1) \
}}}
endef
CONTIKI_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(CONTIKI_SOURCEFILES)}}
PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFILES)}}
# Provide way to create $(OBJECTDIR) if it has been removed by make clean
......@@ -80,13 +89,43 @@ else
include $(target_makefile)
endif
# Decide whether to build or to skip this target for this platform
ifneq ("", "$(PLATFORMS_ONLY)")
ifeq ("","$(filter $(TARGET), $(PLATFORMS_ONLY))")
PLATFORM_ACTION = skip
endif
endif
ifneq ("", "$(PLATFORMS_EXCLUDE)")
ifneq ("","$(filter $(TARGET), $(PLATFORMS_EXCLUDE))")
PLATFORM_ACTION = skip
endif
endif
ifneq ($(BOARD),)
ifneq ("", "$(BOARDS_ONLY)")
ifeq ("","$(filter $(BOARD), $(BOARDS_ONLY))")
PLATFORM_ACTION = skip
endif
endif
ifneq ("", "$(BOARDS_EXCLUDE)")
ifneq ("","$(filter $(BOARD), $(BOARDS_EXCLUDE))")
PLATFORM_ACTION = skip
endif
endif
endif # $(BOARD) not empty
PLATFORM_ACTION ?= build
# Configure MAC layer
# The different options
MAKE_MAC_NULLMAC = 0
MAKE_MAC_CSMA = 1
MAKE_MAC_TSCH = 2
MAKE_MAC_OTHER = 3
MAKE_MAC_BLE = 3
MAKE_MAC_OTHER = 4
# Make CSMA the default MAC
MAKE_MAC ?= MAKE_MAC_CSMA
......@@ -106,6 +145,11 @@ ifeq ($(MAKE_MAC),MAKE_MAC_TSCH)
CFLAGS += -DMAC_CONF_WITH_TSCH=1
endif
ifeq ($(MAKE_MAC),MAKE_MAC_BLE)
MODULES += os/net/mac/ble
CFLAGS += -DMAC_CONF_WITH_BLE=1
endif
ifeq ($(MAKE_MAC),MAKE_MAC_OTHER)
CFLAGS += -DMAC_CONF_WITH_OTHER=1
endif
......@@ -140,7 +184,7 @@ ifeq ($(WITH_IP64),1)
endif
# Configure Routing protocol
MAKE_ROUTING_NONE = 0
MAKE_ROUTING_NULLROUTING = 0
MAKE_ROUTING_RPL_CLASSIC = 1
MAKE_ROUTING_RPL_LITE = 2
......@@ -148,28 +192,36 @@ MAKE_ROUTING_RPL_LITE = 2
ifeq ($(MAKE_NET),MAKE_NET_IPV6)
MAKE_ROUTING ?= MAKE_ROUTING_RPL_LITE
else
MAKE_ROUTING ?= MAKE_ROUTING_NONE
MAKE_ROUTING ?= MAKE_ROUTING_NULLROUTING
endif
ifeq ($(MAKE_ROUTING),MAKE_ROUTING_RPL_CLASSIC)
CFLAGS += -DUIP_CONF_IPV6_RPL=1
CFLAGS += -DUIP_CONF_IPV6_RPL_CLASSIC=1
MODULES += os/net/rpl-classic
CFLAGS += -DROUTING_CONF_RPL_CLASSIC=1
MODULES += os/net/routing/rpl-classic
else ifeq ($(MAKE_ROUTING),MAKE_ROUTING_RPL_LITE)
CFLAGS += -DUIP_CONF_IPV6_RPL=1
CFLAGS += -DUIP_CONF_IPV6_RPL_LITE=1
MODULES += os/net/rpl-lite
else
CFLAGS += -DUIP_CONF_IPV6_RPL=0
CFLAGS += -DROUTING_CONF_RPL_LITE=1
MODULES += os/net/routing/rpl-lite
else ifeq ($(MAKE_ROUTING),MAKE_ROUTING_NULLROUTING)
CFLAGS += -DROUTING_CONF_NULLROUTING=1
MODULES += os/net/routing/nullrouting
endif
ifdef MODULES
UNIQUEMODULES = $(call uniq,$(MODULES))
MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}}
MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}}
MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}}
include $(MODULES_INCLUDES)
CONTIKI_SOURCEFILES += $(MODULES_SOURCES)
MODULEDIRS = $(MODULES_REL) ${wildcard ${addprefix $(CONTIKI)/, $(MODULES)}}
UNIQUEMODULES = $(call uniq,$(MODULEDIRS))
MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}}
CONTIKI_SOURCEFILES += $(MODULES_SOURCES)
# Include module-specific makefiles
MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}}
include $(MODULES_INCLUDES)
# Iterate once more: include the modules added from the previous include.
# Only works with one level of nested module inclusion.
include $(MODULES_INCLUDES)
# C-include module-specific macros using -imacros
MODULES_IMACROS = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/module-macros.h}}
ifneq ($(MODULES_IMACROS),)
CFLAGS += ${foreach d, $(MODULES_IMACROS), -imacros $(d)}
endif
### Verbosity control. Use make V=1 to get verbose builds.
......@@ -206,13 +258,15 @@ SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) $(CONTIKI_ARCH_DIRS)
vpath %.c $(SOURCEDIRS)
vpath %.S $(SOURCEDIRS)
vpath %.s $(SOURCEDIRS)
CFLAGS += ${addprefix -I,$(SOURCEDIRS) $(CONTIKI)}
### Check for a git repo and pass version if found
### git.exe in Windows cmd shells may require no stderr redirection
ifndef RELSTR
RELSTR:=${shell git --git-dir ${CONTIKI}/.git describe --tags --always --dirty}
RELSTR:=${shell git --git-dir ${CONTIKI}/.git --work-tree ${CONTIKI} describe \
--tags --always --dirty}
endif
ifneq ($(RELSTR),)
......@@ -237,26 +291,26 @@ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
rm -f $(@:.o=.$$$$)
endef
### Harmonize filename of a .map file, if the platform's build system wants
### to create one
CONTIKI_NG_PROJECT_MAP = $(addsuffix -$(TARGET).map, $(basename $@))
.PHONY: clean distclean usage help targets boards savetarget savedefines viewconf
clean:
-rm -f *~ *core core *.srec \
*.lst *.map \
*.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \
*.ce *.co
rm -rf $(CLEAN)
-rm -f *.d *.e *.o $(CONTIKI_NG_TARGET_LIB) $(CLEAN)
-rm -rf $(OBJECTDIR)
-rm -f $(addsuffix -$(TARGET).map, $(CONTIKI_PROJECT))
-rm -f $(addsuffix .$(TARGET), $(CONTIKI_PROJECT))
distclean: clean
-rm -f ${addsuffix .$(TARGET),$(CONTIKI_PROJECT)}
distclean:
@for TARG in `ls $(CONTIKI)/arch/platform $(TARGETDIRS)`; do \
echo make $$TARG clean; \
make TARGET=$$TARG clean; \
done
-include $(CONTIKI)/arch/platform/$(TARGET)/Makefile.customrules-$(TARGET)
ifndef CUSTOM_RULE_C_TO_CE
%.ce: %.c
$(TRACE_CC)
$(Q)$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
$(STRIP) --strip-unneeded -g -x $@
endif
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_O
$(OBJECTDIR)/%.o: %.c | $(OBJECTDIR)
$(TRACE_CC)
......@@ -268,6 +322,9 @@ ifndef CUSTOM_RULE_S_TO_OBJECTDIR_O
$(OBJECTDIR)/%.o: %.S | $(OBJECTDIR)
$(TRACE_AS)
$(Q)$(AS) $(ASFLAGS) -o $@ $<
$(OBJECTDIR)/%.o: %.s | $(OBJECTDIR)
$(TRACE_AS)
$(Q)$(AS) $(ASFLAGS) -o $@ $<
endif
ifndef CUSTOM_RULE_C_TO_OBJECTDIR_S
......@@ -300,18 +357,12 @@ ifndef CUSTOM_RULE_C_TO_E
$(Q)$(CC) $(CFLAGS) -E $< -o $@
endif
ifndef CUSTOM_RULE_C_TO_CO
%.co: %.c
$(TRACE_CC)
$(Q)$(CC) $(CFLAGS) -DAUTOSTART_ENABLE -c $< -o $@
endif
ifndef AROPTS
AROPTS = rcf
endif
ifndef CUSTOM_RULE_ALLOBJS_TO_TARGETLIB
contiki-$(TARGET).a: $(CONTIKI_OBJECTFILES)
$(CONTIKI_NG_TARGET_LIB): $(CONTIKI_OBJECTFILES)
$(TRACE_AR)
$(Q)$(AR) $(AROPTS) $@ $^
endif
......@@ -321,7 +372,7 @@ ifndef LD
endif
ifndef CUSTOM_RULE_LINK
%.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a
%.$(TARGET): %.o $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) $(CONTIKI_NG_TARGET_LIB)
$(TRACE_LD)
$(Q)$(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} \
${filter %.a,$^} $(TARGET_LIBFILES) -o $@
......@@ -334,7 +385,25 @@ endif
$(NM) -S -td --size-sort $< | grep -i " [t] " | cut -d' ' -f2,4
usage:
@echo "make MAKETARGETS... [TARGET=(TARGET)] [BOARD=(BOARD)] [savetarget] [targets]"
@echo "Usage:"
@echo " make [TARGET=(TARGET)] [BOARD=(BOARD)] [DEFINES=(DEFINES)] [target]"
@echo ""
@echo "Typical usage:"
@echo " make [TARGET=(TARGET)] [BOARD=(BOARD)] [all]"
@echo ""
@echo " Will build Contiki-NG firmware(s) from the current example dir"
@echo " for platform TARGET, board BOARD."
@echo ""
@echo "Miscellaneous targets:"
@echo " targets Prints list of supported platforms"
@echo " boards Prints a list of supported boards for TARGET"
@echo " savegtarget Saves TARGET and BOARD for future invocations of make"
@echo " savedefines Saves DEFINES for future invocations of make"
@echo " clean Removes all compiled files for TARGET"
@echo " distclean Removes all compiled files for all TARGETs"
@echo " viewconf Prints Contiki-NG build configuration for TARGET"
help: usage
targets:
@ls $(CONTIKI)/arch/platform $(TARGETDIRS)
......@@ -366,6 +435,9 @@ viewconf:
@echo "##### \"MAKE_MAC\": ______________________________ $(MAKE_MAC)"
@echo "##### \"MAKE_NET\": ______________________________ $(MAKE_NET)"
@echo "##### \"MAKE_ROUTING\": __________________________ $(MAKE_ROUTING)"
ifdef MAKE_COAP_DTLS_KEYSTORE
@echo "##### \"MAKE_COAP_DTLS_KEYSTORE\": _______________ $(MAKE_COAP_DTLS_KEYSTORE)"
endif
@echo "----------------- C variables: -----------------"
$(Q)$(CC) $(CFLAGS) -E $(CONTIKI)/tools/viewconf.c | grep \#\#\#\#\#
@echo "------------------------------------------------"
......@@ -384,8 +456,15 @@ viewconf:
# the match-anything rule below instead.
%: %.c
ifeq ($(PLATFORM_ACTION),skip)
# Skip this target.
$(CONTIKI_PROJECT):
@echo "Skipping $@: not for the '$(TARGET)/$(BOARD)' platform!"
else
# Build this target.
# Match-anything pattern rule to allow the project makefiles to
# abstract from the actual binary name. It needs to contain some
# command in order to be a rule, not just a prerequisite.
%: %.$(TARGET)
@
endif
# Contiki-NG: the Next Generation Contiki
# Contiki-NG: The OS for Next Generation IoT Devices
[![Build Status](https://travis-ci.org/contiki-ng/contiki-ng.svg?branch=master)](https://travis-ci.org/contiki-ng/contiki-ng/branches)
[![license](https://img.shields.io/badge/license-3--clause%20bsd-brightgreen.svg)](https://github.com/contiki-ng/contiki-ng/blob/master/LICENSE.md)
[![Latest release](https://img.shields.io/github/release/contiki-ng/contiki-ng.svg)](https://github.com/contiki-ng/contiki-ng/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/contiki-ng/contiki-ng.svg)](https://github.com/contiki-ng/contiki-ng/releases/latest)
[![Last commit](https://img.shields.io/github/last-commit/contiki-ng/contiki-ng.svg)](https://github.com/contiki-ng/contiki-ng/commit/HEAD)
Contiki-NG is an open-source, cross-platform operating system for Next-Generation IoT devices. It focuses on dependable (secure and reliable) low-power communication and standard protocols, such as IPv6/6LoWPAN, 6TiSCH, RPL, and CoAP. Contiki-NG comes with extensive documentation, tutorials, a roadmap, release cycle, and well-defined development flow for smooth integration of community contributions.
Unless excplicitly stated otherwise, Contiki-NG sources are distributed under
the terms of the [3-clause BSD license](LICENSE.md).
Contiki-NG started as a fork of the Contiki OS and retains some of its original features.
Find out more:
Contiki-NG is a fork of Contiki, with focus on next generation IoT protocols and platforms.
Important links:
* GitHub repository: https://github.com/contiki-ng/contiki-ng
* Documentation: https://github.com/contiki-ng/contiki-ng/wiki
* Web site: http://contiki-ng.org
Engage with the community:
* Gitter: https://gitter.im/contiki-ng
* Twitter: https://twitter.com/contiki_ng
* Web site: http://contiki-ng.org
CC = arm-none-eabi-gcc
CPP = arm-none-eabi-cpp
LD = arm-none-eabi-gcc
AR = arm-none-eabi-ar
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
NM = arm-none-eabi-nm
SIZE = arm-none-eabi-size
SREC_CAT = srec_cat
CFLAGS += -mthumb -mabi=aapcs -mlittle-endian
CFLAGS += -Werror -Wall
CFLAGS += -std=c99
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
CFLAGS += -fshort-enums -fomit-frame-pointer -fno-builtin
LDFLAGS += -mthumb -mlittle-endian
OBJDUMP_FLAGS += --disassemble --source --disassembler-options=force-thumb
### Are we building with code size optimisations?
SMALL ?= 1
ifeq ($(SMALL),1)
CFLAGS += -Os
else
CFLAGS += -O2
endif
### Use CMSIS and the existing dbg-io from arch/cpu/arm/common
CONTIKI_ARM_DIRS += . common/dbg-io
CONTIKI_CPU_DIRS += $(addprefix ../arm/, $(CONTIKI_ARM_DIRS))
### CPU-dependent cleanup files
CLEAN += *.elf *.bin *.lst *.hex *.i16hex
### Don't treat the following files as intermediate
.PRECIOUS: %.elf %.hex %.bin
%.i16hex: %.elf
$(OBJCOPY) -O ihex $< $@
%.hex: %.i16hex
$(SREC_CAT) $< -intel -o $@ -intel
%.bin: %.elf
$(OBJCOPY) -O binary $(OBJCOPY_FLAGS) $< $@
%.lst: %.elf
$(OBJDUMP) $(OBJDUMP_FLAGS) $< > $@
### We don't really need the .hex and .bin for the .$(TARGET) but let's make
### sure they get built
%.$(TARGET): %.elf %.hex %.bin
cp $< $@
/*
* Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/
* Copyright (c) 2017, George Oikonomou - http://www.spd.gr
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
......@@ -29,43 +30,56 @@
*/
/*---------------------------------------------------------------------------*/
/**
* \addtogroup cc26xx
* @{
*
* \defgroup cc26xx-gpio-interrupts CC13xx/CC26xx GPIO interrupt handling
*
* The CC13xx/CC26xx GPIO interrupt handler and an API which can be used by
* other parts of the code when they wish to be notified of a GPIO interrupt
*
* \addtogroup arm
* @{
*
* \file
* Header file for the CC13xx/CC26xx GPIO interrupt management
* Compiler and data type definitions for all ARM-based CPUs
*/
/*---------------------------------------------------------------------------*/
#ifndef GPIO_INTERRUPT_H_
#define GPIO_INTERRUPT_H_
#ifndef ARM_DEF_
#define ARM_DEF_
/*---------------------------------------------------------------------------*/
#include <stdint.h>
/*---------------------------------------------------------------------------*/
typedef void (*gpio_interrupt_handler_t)(uint8_t ioid);
/*---------------------------------------------------------------------------*/
/** \brief Initialise the GPIO interrupt handling module */
void gpio_interrupt_init(void);
/**