diff --git a/.travis.yml b/.travis.yml index 0c5279ed..e42c4f80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_install: # Changes to the BSP may break this build, sorry! # - "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} ; }" + - "function _stm32l0opts { echo mcci:stm32:${1:-mcci_catena_4551}:lorawan_region=${2:-us915},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,6 +29,12 @@ 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 + # + # Centralize the STM32 config override. See the following: + # https://github.com/mcci-catena/Arduino_Core_STM32/issues/30 + # https://github.com/mcci-catena/arduino-lorawan/issues/45 + - export MCCI_STM32_OPTS="--pref recipe.hooks.objcopy.postobjcopy.1.pattern=true" + # # show the output of the config commands for reference. - "echo $(_stm32l0opts) $(_stm32l0opts '' projcfg)" @@ -37,12 +43,13 @@ before_install: install: - arduino --install-boards mcci:samd - arduino --install-boards mcci:stm32 + - 'if [ -d $HOME/.arduino15/packages/mcci/hardware/stm32/1.1.0 ]; then echo "Work around broken BSP version 1.1.0" ; export MCCI_STM32_OPTS="$MCCI_STM32_OPTS --pref build.board=CATENA_4551" ; fi' script: # 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 + - arduino --verify --board $(_stm32l0opts) $MCCI_STM32_OPTS $PWD/examples/header_test/header_test.ino # # test each of the regions. - arduino --verify --board $(_samdopts '' us915) $PWD/examples/raw-feather/raw-feather.ino @@ -98,13 +105,14 @@ script: # *** TESTS FOR STM32L0 / Catena 4551 **** # make sure you install the BSP above. # - - _projcfg CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino - - _projcfg CFG_eu868 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino - - _projcfg CFG_au921 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino - - _projcfg CFG_as923 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino - - _projcfg CFG_in866 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino - - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino - - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/ttn-otaa/ttn-otaa.ino - - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts) $PWD/examples/ttn-abp/ttn-abp.ino + - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - arduino --verify --board $(_stm32l0opts '' eu868 ) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - arduino --verify --board $(_stm32l0opts '' au921 ) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - arduino --verify --board $(_stm32l0opts '' as923 ) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - arduino --verify --board $(_stm32l0opts '' as923jp) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - arduino --verify --board $(_stm32l0opts '' in866 ) $MCCI_STM32_OPTS $PWD/examples/raw-feather/raw-feather.ino + - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts '' projcfg) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino + - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts '' projcfg) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa/ttn-otaa.ino + - _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board $(_stm32l0opts '' projcfg) $MCCI_STM32_OPTS $PWD/examples/ttn-abp/ttn-abp.ino ### end of file ### \ No newline at end of file