optional build_scripts

This commit is contained in:
livello
2018-10-18 00:44:16 +03:00
parent 655ef79b5d
commit ab1ab64f77
10 changed files with 68 additions and 12 deletions

View File

@@ -0,0 +1,8 @@
#! /bin/bash
export FLAGS="$FLAGS -DCONTROLLINO"
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07"
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_controllino.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,8 @@
#! /bin/bash
export FLAGS="$FLAGS -DWiz5500"
export FLAGS="$FLAGS -DARTNET_ENABLE"
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_due-5500.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,6 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_due.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,6 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_esp32.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,6 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_esp8266.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,6 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_mega2560-net.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,9 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE="custom-build-flags/build_flags_mega2560.sh"
#CUSTOM_BUILD_FLAGS_FILE="custom-build-flags/build_flags_$PIOENV.sh"
#echo $PIOENV > custom-build-flags/1.txt
#TODO: make one file for all envs
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -0,0 +1,6 @@
#! /bin/bash
CUSTOM_BUILD_FLAGS_FILE=custom-build-flags/build_flags_stm32.sh
if [ -f $CUSTOM_BUILD_FLAGS_FILE ]; then
source $CUSTOM_BUILD_FLAGS_FILE
fi
echo $FLAGS

View File

@@ -10,14 +10,14 @@
[platformio] [platformio]
src_dir = lighthub src_dir = lighthub
env_default = env_default =
megaatmega2560 ; megaatmega2560
; megaatmega2560-net ; megaatmega2560-net
; due ; due
; esp8266 ; esp8266
; esp32 ; esp32
; megaatmega2560-5500 ; megaatmega2560-5500
; due-5500 ; due-5500
; controllino controllino
; stm32 ; stm32
;build_dir = !sh pioenvs.sh ${platformio.env_default} ;build_dir = !sh pioenvs.sh ${platformio.env_default}
@@ -30,7 +30,7 @@ platform = espressif32
framework = arduino framework = arduino
board = pico32 board = pico32
lib_ldf_mode = chain+ lib_ldf_mode = chain+
build_flags = !sh build_flags_esp32.sh build_flags = !bash check_custom_build_flags_esp32.sh
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DS2482_OneWire
@@ -55,7 +55,7 @@ upload_protocol = stlink
debug_tool = stlink debug_tool = stlink
extra_scripts = pre:!pre_stm32.sh extra_scripts = pre:!pre_stm32.sh
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = !sh build_flags_stm32.sh build_flags = !bash check_custom_build_flags_stm32.sh
lib_deps = lib_deps =
DallasTemperature DallasTemperature
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
@@ -78,7 +78,7 @@ platform = atmelsam
framework = arduino framework = arduino
board = due board = due
lib_ldf_mode = chain+ lib_ldf_mode = chain+
build_flags = !sh build_flags_due.sh build_flags = !bash check_custom_build_flags_due.sh
lib_deps = lib_deps =
https://github.com/sebnil/DueFlashStorage https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
@@ -97,6 +97,7 @@ lib_deps =
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
https://github.com/arcao/Syslog.git https://github.com/arcao/Syslog.git
Streaming
[env:megaatmega2560] [env:megaatmega2560]
@@ -105,8 +106,10 @@ board = megaatmega2560
;upload_port = net:192.168.88.31:23 ;upload_port = net:192.168.88.31:23
framework = arduino framework = arduino
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = !sh build_flags_mega2560.sh build_flags = !bash check_custom_build_flags_mega2560.sh
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson https://github.com/anklimov/aJson
@@ -129,7 +132,7 @@ platform = espressif8266
framework = arduino framework = arduino
board = nodemcuv2 board = nodemcuv2
lib_ldf_mode = chain+ lib_ldf_mode = chain+
build_flags = !sh build_flags_esp8266.sh build_flags = !bash check_custom_build_flags_esp8266.sh
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DS2482_OneWire
@@ -153,7 +156,7 @@ platform = atmelavr
board = megaatmega2560 board = megaatmega2560
framework = arduino framework = arduino
upload_port = net:192.168.88.2:23000 upload_port = net:192.168.88.2:23000
build_flags = !sh build_flags_mega2560-net.sh build_flags = !bash check_custom_build_flags_mega2560-net.sh
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
@@ -180,8 +183,7 @@ platform = atmelsam
framework = arduino framework = arduino
board = due board = due
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = -D Wiz5500 -D ARTNET_ENABLE build_flags = !bash check_custom_build_flags_due-5500.sh
build_flags = !sh build_flags_due-5500.sh
lib_deps = lib_deps =
https://github.com/sebnil/DueFlashStorage https://github.com/sebnil/DueFlashStorage
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
@@ -207,8 +209,7 @@ platform = atmelavr
board = megaatmega2560 board = megaatmega2560
framework = arduino framework = arduino
;lib_ldf_mode = chain+ ;lib_ldf_mode = chain+
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short) build_flags = !bash check_custom_build_flags_controllino.sh
build_flags = -D CONTROLLINO -D CUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:07
lib_deps = lib_deps =
https://github.com/anklimov/Arduino-Temperature-Control-Library.git https://github.com/anklimov/Arduino-Temperature-Control-Library.git
https://github.com/anklimov/DS2482_OneWire https://github.com/anklimov/DS2482_OneWire