diff --git a/.gitignore b/.gitignore index 91721ed08..0ff1ebfa2 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ COOJA.testlog *.native *.nrf52dk *.openmote-cc2538 +*.simplelink *.sky *.firmware *.srf06-cc26xx diff --git a/arch/cpu/simplelink-cc13xx-cc26xx/cc13x0-cc26x0/cc13x0-cc26x0.lds b/arch/cpu/simplelink-cc13xx-cc26xx/cc13x0-cc26x0/cc13x0-cc26x0.lds index 83e834f13..26930dea8 100644 --- a/arch/cpu/simplelink-cc13xx-cc26xx/cc13x0-cc26x0/cc13x0-cc26x0.lds +++ b/arch/cpu/simplelink-cc13xx-cc26xx/cc13x0-cc26x0/cc13x0-cc26x0.lds @@ -30,7 +30,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -MIN_STACKSIZE = 0x800; /* 2048 bytes */ +MIN_STACKSIZE = 0x600; /* 1536 bytes */ HEAPSIZE = 0x100; /* 256 bytes */ MEMORY diff --git a/arch/cpu/simplelink-cc13xx-cc26xx/cc13x2-cc26x2/cc13x2-cc26x2.lds b/arch/cpu/simplelink-cc13xx-cc26xx/cc13x2-cc26x2/cc13x2-cc26x2.lds index 2c663d6b2..9c2211cb8 100644 --- a/arch/cpu/simplelink-cc13xx-cc26xx/cc13x2-cc26x2/cc13x2-cc26x2.lds +++ b/arch/cpu/simplelink-cc13xx-cc26xx/cc13x2-cc26x2/cc13x2-cc26x2.lds @@ -30,7 +30,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -MIN_STACKSIZE = 0x800; /* 2048 bytes */ +MIN_STACKSIZE = 0x600; /* 1536 bytes */ HEAPSIZE = 0x100; /* 256 bytes */ MEMORY diff --git a/arch/cpu/simplelink-cc13xx-cc26xx/cc13xx-cc26xx-conf.h b/arch/cpu/simplelink-cc13xx-cc26xx/cc13xx-cc26xx-conf.h index 2dbb0b8b9..87fa922b9 100644 --- a/arch/cpu/simplelink-cc13xx-cc26xx/cc13xx-cc26xx-conf.h +++ b/arch/cpu/simplelink-cc13xx-cc26xx/cc13xx-cc26xx-conf.h @@ -91,7 +91,7 @@ */ /* - * Set the inactivity timeout peroid for the RF driver. This determines how + * Set the inactivity timeout period for the RF driver. This determines how * long the RF driver will wait when inactive until turning off the RF Core. * Specified in microseconds. */ diff --git a/arch/platform/simplelink/Makefile.simplelink b/arch/platform/simplelink/Makefile.simplelink index 929bbc8b7..d14643c3f 100644 --- a/arch/platform/simplelink/Makefile.simplelink +++ b/arch/platform/simplelink/Makefile.simplelink @@ -24,7 +24,7 @@ verify_family = $(shell [ -d $(CONTIKI)/arch/platform/simplelink/$(1)/$(BOARD) ] # Test each supported SimpleLink family and see if it contains the specified Board. # Throw an error if it isn't found. FAMILY := $(foreach FAMILY, $(SIMPLELINK_FAMILIES), $(call verify_family,$(FAMILY))) -ifeq ($(FAMILY),) +ifeq ($(strip $(FAMILY)),) $(error Board '$(BOARD)' does not corresponding to any SimpleLink family. Make sure your BOARD variable is correct.) endif # If multiple families are found, only the first one is chosen. If this ever diff --git a/arch/platform/simplelink/cc13xx-cc26xx/Makefile.cc13xx-cc26xx b/arch/platform/simplelink/cc13xx-cc26xx/Makefile.cc13xx-cc26xx index 5c34a233f..9f2dbe45b 100644 --- a/arch/platform/simplelink/cc13xx-cc26xx/Makefile.cc13xx-cc26xx +++ b/arch/platform/simplelink/cc13xx-cc26xx/Makefile.cc13xx-cc26xx @@ -25,20 +25,22 @@ TARGET_FAMILY_DIRS += $(BOARD) CONTIKI_TARGET_DIRS += $(FAMILY) CONTIKI_TARGET_DIRS += $(addprefix $(FAMILY)/, $(TARGET_FAMILY_DIRS)) -DEFINES += DeviceFamily_$(DEVICE_FAMILY) -DEFINES += DEVICE_LINE_$(DEVICE_LINE) -DEFINES += DEVICE_$(DEVICE) -DEFINES += $(BOARD_TYPE) -DEFINES += SUPPORTS_PROP_MODE=$(SUPPORTS_PROP_MODE) -DEFINES += SUPPORTS_IEEE_MODE=$(SUPPORTS_IEEE_MODE) -DEFINES += SUPPORTS_BLE_BEACON=$(SUPPORTS_BLE_BEACON) -DEFINES += SUPPORTS_HIGH_PA=$(SUPPORTS_HIGH_PA) +BOARD_DEFINES += DeviceFamily_$(DEVICE_FAMILY) +BOARD_DEFINES += DEVICE_LINE_$(DEVICE_LINE) +BOARD_DEFINES += DEVICE_$(DEVICE) +BOARD_DEFINES += $(BOARD_TYPE) +BOARD_DEFINES += SUPPORTS_PROP_MODE=$(SUPPORTS_PROP_MODE) +BOARD_DEFINES += SUPPORTS_IEEE_MODE=$(SUPPORTS_IEEE_MODE) +BOARD_DEFINES += SUPPORTS_BLE_BEACON=$(SUPPORTS_BLE_BEACON) +BOARD_DEFINES += SUPPORTS_HIGH_PA=$(SUPPORTS_HIGH_PA) # If the user-specified a Node ID, pass a define ifdef NODEID - DEFINES += IEEE_ADDR_NODE_ID=$(NODEID) + BOARD_DEFINES += IEEE_ADDR_NODE_ID=$(NODEID) endif +CFLAGS += $(addprefix -D, $(BOARD_DEFINES)) + CONTIKI_TARGET_SOURCEFILES += platform.c CONTIKI_TARGET_SOURCEFILES += batmon-sensor.c CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES) diff --git a/examples/dev/gpio-hal/simplelink/pins.c b/examples/dev/gpio-hal/simplelink/pins.c new file mode 100644 index 000000000..16a7afa1f --- /dev/null +++ b/examples/dev/gpio-hal/simplelink/pins.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2018, Texas Instruments Incorporated + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Texas Instruments Incorporated nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/*---------------------------------------------------------------------------*/ +#include "contiki.h" +#include "dev/gpio-hal.h" +/*---------------------------------------------------------------------------*/ +#include +/*---------------------------------------------------------------------------*/ +gpio_hal_pin_t out_pin1 = Board_PIN_LED0; +gpio_hal_pin_t out_pin2 = Board_PIN_LED1; +gpio_hal_pin_t out_pin3 = Board_PIN_LED2; +/*---------------------------------------------------------------------------*/ +gpio_hal_pin_t btn_pin = Board_PIN_BTN1; +/*---------------------------------------------------------------------------*/ diff --git a/tests/02-compile-arm-ports-01/Makefile b/tests/02-compile-arm-ports-01/Makefile index 4bb1e9269..f4063a54b 100644 --- a/tests/02-compile-arm-ports-01/Makefile +++ b/tests/02-compile-arm-ports-01/Makefile @@ -35,6 +35,40 @@ dev/leds/srf06-cc26xx:BOARD=launchpad/cc2650 \ mqtt-client/srf06-cc26xx:BOARD=srf06/cc26xx \ mqtt-client/srf06-cc26xx:BOARD=launchpad/cc2650 \ mqtt-client/srf06-cc26xx:BOARD=sensortag/cc2650 \ +hello-world/simplelink:BOARD=launchpad/cc26x2r1 \ +hello-world/simplelink:BOARD=sensortag/cc2650 \ +nullnet/simplelink:BOARD=sensortag/cc2650 \ +rpl-border-router/simplelink:BOARD=launchpad/cc26x2r1 \ +sensniff/simplelink:BOARD=launchpad/cc26x2r1 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1310 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1312r1 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1350 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1350-4 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1352p1 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1352p-2 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1352p-4 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc1352r1 \ +dev/gpio-hal/simplelink:BOARD=launchpad/cc26x2r1 \ +dev/gpio-hal/simplelink:BOARD=sensortag/cc1350 \ +dev/gpio-hal/simplelink:BOARD=sensortag/cc2650 \ +dev/gpio-hal/simplelink:BOARD=srf06/cc13x0 \ +dev/gpio-hal/simplelink:BOARD=srf06/cc26x0 \ +dev/leds/simplelink:BOARD=launchpad/cc1310 \ +dev/leds/simplelink:BOARD=launchpad/cc1312r1 \ +dev/leds/simplelink:BOARD=launchpad/cc1350 \ +dev/leds/simplelink:BOARD=launchpad/cc1350-4 \ +dev/leds/simplelink:BOARD=launchpad/cc1352p1 \ +dev/leds/simplelink:BOARD=launchpad/cc1352p-2 \ +dev/leds/simplelink:BOARD=launchpad/cc1352p-4 \ +dev/leds/simplelink:BOARD=launchpad/cc1352r1 \ +dev/leds/simplelink:BOARD=launchpad/cc26x2r1 \ +dev/leds/simplelink:BOARD=sensortag/cc1350 \ +dev/leds/simplelink:BOARD=sensortag/cc2650 \ +dev/leds/simplelink:BOARD=srf06/cc13x0 \ +dev/leds/simplelink:BOARD=srf06/cc26x0 \ +mqtt-client/simplelink:BOARD=launchpad/cc26x2r1 \ +mqtt-client/simplelink:BOARD=sensortag/cc2650:DEFINES=BOARD_CONF_SENSORS_DISABLE=1,TI_SPI_CONF_ENABLE=0 \ +mqtt-client/simplelink:BOARD=srf06/cc26x0:DEFINES=BOARD_CONF_SENSORS_DISABLE=1,TI_SPI_CONF_ENABLE=0 \ mqtt-client/cc2538dk \ storage/cfs-coffee/cc2538dk \ sensniff/cc2538dk \ diff --git a/tests/compile-all/build.sh b/tests/compile-all/build.sh index 795343eeb..bab912f06 100755 --- a/tests/compile-all/build.sh +++ b/tests/compile-all/build.sh @@ -101,6 +101,10 @@ do then # srf06-cc26xx has multiple boards BOARDS="srf06/cc26xx srf06/cc13xx launchpad/cc2650 launchpad/cc1350 sensortag/cc2650 sensortag/cc1350" + elif [[ "$platform" == "simplelink" ]] + then + # SimpleLink has multiple boards + BOARDS="launchpad/cc1310 launchpad/cc1312r1 launchpad/cc1350 launchpad/cc1350-4 launchpad/cc1352p-2 launchpad/cc1352p-4 launchpad/cc1352p1 launchpad/cc1352r1 launchpad/cc2650 launchpad/cc26x2r1 sensortag/cc1350 sensortag/cc2650 srf06/cc13x0 srf06/cc26x0" elif [[ "$platform" == "zoul" ]] then # Zoul has multiple boards