From 3e6f979bd0efeb27232a3397fc8b66b8875a5c23 Mon Sep 17 00:00:00 2001 From: Terry Moore Date: Sun, 5 Aug 2018 01:34:22 -0400 Subject: [PATCH 1/3] Fix #92: support v1.1.0 MCCI STM32 BSP --- .travis.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c5279ed..a570e5f2 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)" @@ -98,13 +104,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 + - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino + - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa/ttn-otaa.ino + - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-abp/ttn-abp.ino ### end of file ### \ No newline at end of file From a0236d0227ba2acf0cb407c19cea0b6d8380d37b Mon Sep 17 00:00:00 2001 From: Terry Moore Date: Sun, 5 Aug 2018 02:51:55 -0400 Subject: [PATCH 2/3] Work around bug https://github.com/mcci-catena/Arduino_Core_STM32/issues/31 --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a570e5f2..ac89be01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,12 +43,13 @@ before_install: install: - arduino --install-boards mcci:samd - arduino --install-boards mcci:stm32 + - 'if [ -d $HOME/.arduino15/packages/mcci/hardawre/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 @@ -110,8 +111,8 @@ script: - 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 - - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino - - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-otaa/ttn-otaa.ino - - arduino --verify --board $(_stm32l0opts '' us915 ) $MCCI_STM32_OPTS $PWD/examples/ttn-abp/ttn-abp.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 From 00b4905fd011a290249ecea9de831ee936c75cf5 Mon Sep 17 00:00:00 2001 From: Terry Moore Date: Sun, 5 Aug 2018 03:03:49 -0400 Subject: [PATCH 3/3] Correct typo in work-around --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ac89be01..e42c4f80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: install: - arduino --install-boards mcci:samd - arduino --install-boards mcci:stm32 - - 'if [ -d $HOME/.arduino15/packages/mcci/hardawre/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' + - '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: