Skip to content

Commit

Permalink
Merge pull request #66 from mcci-catena/TMM-feature-as923jp
Browse files Browse the repository at this point in the history
Add experimental as923jp support
  • Loading branch information
terrillmoore authored Jun 2, 2018
2 parents 9f7f0eb + f813db1 commit 524c783
Show file tree
Hide file tree
Showing 19 changed files with 534 additions and 99 deletions.
56 changes: 53 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,64 @@ before_install:
- mv arduino-1.8.5 $HOME/arduino_ide
- ln -s $PWD $HOME/arduino_ide/libraries/Test_Library
- export PATH="$HOME/arduino_ide:$PATH"
#
# functions to generate the board settings for SAMD, STM32L0, ...
# keep args for these aligned for any common options. $1 is always board name, $2 is region.
#
# 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} ; }"
#
# 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 ; }
#
# Handy macro to deal with expected failures.
- 'function _expect_failure { if [ $? -eq 0 ]; then echo "Suceeded, but should have failed!" ; echo project_config/lmic_project_config.h ; cat $PWD/project_config/lmic_project_config.h ; return 1 ; else echo "Failed, as expected"; return 0 ; fi ; }'
#
# 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

install:
- arduino --install-boards mcci:samd
# - arduino --install-boards mcci:stm32

script:
- arduino --verify --board mcci:samd:mcci_catena_4450 $PWD/examples/raw-feather/raw-feather.ino
- printf '#define COMPILE_REGRESSION_TEST 1\n#define CFG_sx1276_radio 1\n#define CFG_us915 1\n' > $PWD/project_config/lmic_project_config.h && arduino --verify --board mcci:samd:mcci_catena_4450 $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino
#
# show the output of the config commands for reference.
- "echo $(_stm32l0opts) $(_stm32l0opts '' projcfg)"
- "echo $(_samdopts) $(_samdopts '' projcfg)"

# - arduino --pref "build.verbose=true" --verify --board mcci:stm32:Catena:pnum=CATENA_4551 $PWD/examples/raw-feather/raw-feather.ino
#
# test each of the regions.
- arduino --verify --board $(_samdopts '' us915) $PWD/examples/raw-feather/raw-feather.ino
- arduino --verify --board $(_samdopts '' eu868) $PWD/examples/raw-feather/raw-feather.ino
# V1.1.0 of the samd bsp doesn't support au921 correctly -- test with projcfg
# - arduino --verify --board $(_samdopts '' au921) $PWD/examples/raw-feather/raw-feather.ino
- arduino --verify --board $(_samdopts '' as923) $PWD/examples/raw-feather/raw-feather.ino
- arduino --verify --board $(_samdopts '' as923jp) $PWD/examples/raw-feather/raw-feather.ino
- arduino --verify --board $(_samdopts '' in866) $PWD/examples/raw-feather/raw-feather.ino

#
# some tests using the projcfg file that should pass
- _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1276_radio && arduino --verify --board mcci:samd:mcci_catena_4450:lorawan_region=projcfg $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino
- _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1272_radio && arduino --verify --board mcci:samd:mcci_catena_4450:lorawan_region=projcfg $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino
- _projcfg CFG_au921 CFG_sx1276_radio && arduino --verify --board $(_samdopts '' projcfg) $PWD/examples/raw-feather/raw-feather.ino

#
# some tests that should generate build failures.
#
# COMPILE_REGRESSION_TEST must be defined for ttn-otaa-feather-us915
- _projcfg CFG_us915 CFG_sx1272_radio && { arduino --verify --board mcci:samd:mcci_catena_4450:lorawan_region=projcfg $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino ; _expect_failure; }
#
# Only one radio may be defined
- _projcfg COMPILE_REGRESSION_TEST CFG_us915 CFG_sx1272_radio CFG_sx1276_radio && { arduino --verify --board mcci:samd:mcci_catena_4450:lorawan_region=projcfg $PWD/examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino ; _expect_failure; }


#
# *** TESTS FOR STM32L0 / Catena 4551 ****
# make sure you install the BSP above.
#
# - arduino --verify --board $(_stm32l0opts) $PWD/examples/raw-feather/raw-feather.ino

### end of file ###
Loading

0 comments on commit 524c783

Please sign in to comment.