From 26ff33a8acba8d0855162845404e28ef0050061a Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 22 Apr 2020 15:00:44 +0200 Subject: [PATCH] Added support for Roger Clark's STM32duino core TRAVIS_FORCE_BUILD --- .travis.yml | 13 +++++++++++++ src/BuildOpt.h | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9552fd5e..af3e371b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,10 +17,13 @@ env: - BOARD="arduino:megaavr:uno2018:mode=on" - BOARD="SparkFun:apollo3:amap3redboard" - BOARD="arduino:mbed:nano33ble" + - BOARD="stm32duino:STM32F1:mapleMini" + #- BOARD="stm32duino:STM32F4:discovery_f407" addons: apt: packages: + # required for Adafruit nRF52 (adafruit-nrfutil package) - python3 - python3-pip - python3-setuptools @@ -98,6 +101,16 @@ before_install: arduino --install-boards arduino:mbed; export SKIP_PAT='(HTTP|MQTT).*ino'; + elif [[ "$BOARD" =~ "stm32duino:STM32F1:" ]]; then + export BUILD_EXAMPLES=false; + arduino --pref "boardsmanager.additional.urls=http://dan.drown.org/stm32duino/package_STM32duino_index.json" --save-prefs 2>&1; + arduino --install-boards stm32duino:STM32F1; + + elif [[ "$BOARD" =~ "stm32duino:STM32F4:" ]]; then + export BUILD_EXAMPLES=false; + arduino --pref "boardsmanager.additional.urls=http://dan.drown.org/stm32duino/package_STM32duino_index.json" --save-prefs 2>&1; + arduino --install-boards stm32duino:STM32F4; + fi # check if this release commit (or forced build) and if so, build for every board diff --git a/src/BuildOpt.h b/src/BuildOpt.h index 6c14e783..8273cd3f 100644 --- a/src/BuildOpt.h +++ b/src/BuildOpt.h @@ -138,6 +138,17 @@ // Nano 33 BLE uses mbed libraries, which already contain ESP8266 driver #define _RADIOLIB_ESP8266_H +#elif defined(__STM32F4__) || defined(__STM32F1__) + // Arduino STM32 core by Roger Clark (https://github.com/rogerclarkmelbourne/Arduino_STM32) + #define RADIOLIB_PLATFORM "STM32duino (unofficial)" + #define RADIOLIB_PIN_TYPE uint8_t + #define RADIOLIB_PIN_MODE WiringPinMode + #define RADIOLIB_PIN_STATUS uint8_t + #define RADIOLIB_INTERRUPT_STATUS ExtIntTriggerMode + #define RADIOLIB_NC (0xFF) + #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED + #define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 + #else // other platforms not covered by the above list - this may or may not work #define RADIOLIB_PLATFORM "Unknown"