diff --git a/.travis.yml b/.travis.yml index 8329fda4..761b9be2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ before_install: # - "function _samdopts { echo mcci:samd:${1:-mcci_catena_4450}:lorawan_region=${2:-us915} ; }" - "function _stm32l0opts { echo mcci:stm32:Catena:pnum=${1:-CATENA_4551},opt=${3:-osstd},xserial=${4:-generic},usb=${5:-none},upload_method=${6:-STLink} ; }" - # + # # Put one or more arguments into lmic_project_config.h as `#define $i\n` - function _projcfg { for i in "$@" ; do printf '#define %s 1\n' "$i" ; done > $PWD/project_config/lmic_project_config.h ; } # @@ -29,17 +29,20 @@ before_install: # # modify the board manager preferences to point to our BSPs. - arduino --pref "boardsmanager.additional.urls=https://github.com/mcci-catena/arduino-boards/raw/master/BoardManagerFiles/package_mcci_index.json" --save-prefs + # + # show the output of the config commands for reference. + - "echo $(_stm32l0opts) $(_stm32l0opts '' projcfg)" + - "echo $(_samdopts) $(_samdopts '' projcfg)" install: - arduino --install-boards mcci:samd - arduino --install-boards mcci:stm32 script: -# -# show the output of the config commands for reference. - - "echo $(_stm32l0opts) $(_stm32l0opts '' projcfg)" - - "echo $(_samdopts) $(_samdopts '' projcfg)" +# simple header file test + - arduino --verify --board $(_samdopts) $PWD/examples/header_test/header_test.ino + - arduino --verify --board $(_stm32l0opts) $PWD/examples/header_test/header_test.ino # # test each of the regions. - arduino --verify --board $(_samdopts '' us915) $PWD/examples/raw-feather/raw-feather.ino diff --git a/examples/header_test/header_test.ino b/examples/header_test/header_test.ino new file mode 100644 index 00000000..7e3b4208 --- /dev/null +++ b/examples/header_test/header_test.ino @@ -0,0 +1,36 @@ +/* + +Module: header_test.ino + +Function: + Simple hello-world (and compile-test) app + +Copyright notice and License: + See LICENSE file accompanying this project. + +Author: + Terry Moore, MCCI Corporation April 2018 + +*/ + +#include + +# define STATIC_ASSERT(e) \ + void STATIC_ASSERT__(int MCCIADK_C_ASSERT_x[(e) ? 1: -1]) + +STATIC_ASSERT(ARDUINO_LMIC_VERSION >= ARDUINO_LMIC_VERSION_CALC(2,2,0,0)); + +STATIC_ASSERT(ARDUINO_LMIC_VERSION_CALC(1,2,3,4) == 0x01020304); + +STATIC_ASSERT(ARDUINO_LMIC_VERSION_GET_MAJOR(ARDUINO_LMIC_VERSION_CALC(1,2,3,4)) == 1); +STATIC_ASSERT(ARDUINO_LMIC_VERSION_GET_MINOR(ARDUINO_LMIC_VERSION_CALC(1,2,3,4)) == 2); +STATIC_ASSERT(ARDUINO_LMIC_VERSION_GET_PATCH(ARDUINO_LMIC_VERSION_CALC(1,2,3,4)) == 3); +STATIC_ASSERT(ARDUINO_LMIC_VERSION_GET_LOCAL(ARDUINO_LMIC_VERSION_CALC(1,2,3,4)) == 4); + +void setup() + { + } + +void loop() + { + }