Browse Source

Changed build-all script

fastled
Xose Pérez 8 years ago
parent
commit
89a1bd30cc
3 changed files with 33 additions and 171 deletions
  1. +3
    -8
      code/build-all
  2. +30
    -30
      code/espurna/config/hardware.h
  3. +0
    -133
      code/platformio.custom.ini

+ 3
- 8
code/build-all View File

@ -1,13 +1,10 @@
#!/bin/bash #!/bin/bash
mv platformio.ini platformio.backup
cp platformio.custom.ini platformio.ini
# Environments to build # Environments to build
ENVIRONMENTS="sonoff-debug sonoff-dht22-debug sonoff-ds18b20-debug s20-debug sonoff-pow-debug slampher-debug"
ENVIRONMENTS="sonoff-debug sonoff-dht22-debug sonoff-ds18b20-debug sonoff-pow-debug sonoff-dual-debug sonoff-4ch-debug electrodragon-debug ecoplug-debug"
# Get current version # Get current version
version=`cat src/config/version.h | grep APP_VERSION | awk '{print $3}' | sed 's/"//g'`
version=`cat espurna/config/version.h | grep APP_VERSION | awk '{print $3}' | sed 's/"//g'`
echo $version echo $version
# Create output folder # Create output folder
@ -15,11 +12,9 @@ mkdir -p firmware
# Build all the required firmwares # Build all the required firmwares
for environment in $ENVIRONMENTS; do for environment in $ENVIRONMENTS; do
platformio run -vv -e $environment
platformio run -e $environment
mv .pioenvs/$environment/firmware.bin firmware/espurna-$version-$environment.bin mv .pioenvs/$environment/firmware.bin firmware/espurna-$version-$environment.bin
done done
platformio run -vv -t uploadfs -e node-debug platformio run -vv -t uploadfs -e node-debug
mv .pioenvs/node-debug/spiffs.bin firmware/espurna-$version-spiffs.bin mv .pioenvs/node-debug/spiffs.bin firmware/espurna-$version-spiffs.bin
mv platformio.backup platformio.ini

+ 30
- 30
code/espurna/config/hardware.h View File

@ -7,12 +7,12 @@
//#define NODEMCUV2 //#define NODEMCUV2
//#define SONOFF //#define SONOFF
//#define SONOFF_TH //#define SONOFF_TH
//#define SLAMPHER
//#define S20
//#define SONOFF_SV
//#define SONOFF_POW //#define SONOFF_POW
//#define SONOFF_DUAL //#define SONOFF_DUAL
//#define SONOFF_4CH //#define SONOFF_4CH
//#define SONOFF_SV
//#define SLAMPHER
//#define S20
//#define ESP_RELAY_BOARD //#define ESP_RELAY_BOARD
//#define ECOPLUG //#define ECOPLUG
//#define ESPURNA //#define ESPURNA
@ -60,6 +60,33 @@
#define LED1_PIN 13 #define LED1_PIN 13
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
#elif defined(SONOFF_SV)
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_SV"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
#elif defined(SLAMPHER)
#define MANUFACTURER "ITEAD"
#define DEVICE "SLAMPHER"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
#elif defined(S20)
#define MANUFACTURER "ITEAD"
#define DEVICE "S20"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
#elif defined(SONOFF_TOUCH) #elif defined(SONOFF_TOUCH)
#define MANUFACTURER "ITEAD" #define MANUFACTURER "ITEAD"
@ -104,33 +131,6 @@
#define LED1_PIN 13 #define LED1_PIN 13
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
#elif defined(SONOFF_SV)
#define MANUFACTURER "ITEAD"
#define DEVICE "SONOFF_SV"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
#elif defined(SLAMPHER)
#define MANUFACTURER "ITEAD"
#define DEVICE "SLAMPHER"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
#elif defined(S20)
#define MANUFACTURER "ITEAD"
#define DEVICE "S20"
#define BUTTON1_PIN 0
#define RELAY1_PIN 12
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Electrodragon boards // Electrodragon boards
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 0
- 133
code/platformio.custom.ini View File

@ -1,133 +0,0 @@
#
# PLEASE NOTE:
# This platformio.ini file is not standard and uses a custom feature.
# The "include" option is not supported by the official version.
# Check my PR for this feature here:
# https://github.com/platformio/platformio/pull/790
#
[platformio]
env_default = node-debug
src_dir = espurna
[common]
platform = espressif8266_stage
framework = arduino
extra_script = pio_hooks.py
#lib_ignore = FauxmoESP, ESPAsyncUDP
lib_deps =
DHT sensor library
Adafruit Unified Sensor
Time
ArduinoJson
ESPAsyncTCP
ESPAsyncWebServer
https://github.com/marvinroger/async-mqtt-client
ESPAsyncUDP
Embedis
NtpClientLib
https://bitbucket.org/xoseperez/justwifi.git
https://bitbucket.org/xoseperez/nofuss.git
https://bitbucket.org/xoseperez/hlw8012.git
https://bitbucket.org/xoseperez/emonliteesp.git
https://bitbucket.org/xoseperez/fauxmoESP.git
https://github.com/jccprj/RemoteSwitch-arduino-library
[ota]
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
[def]
build_flags_debug = -g -Wl,-Tesp8266.flash.1m128.ld -DDEBUG_PORT=Serial -DENABLE_FAUXMO=1
build_flags_ota = -Wl,-Tesp8266.flash.1m128.ld -DENABLE_FAUXMO=1
# ------------------------------------------------------------------------------
[env:node-debug]
include = common
board = nodemcuv2
platform = espressif8266
build_flags = -g -DNODEMCUV2 -DDEBUG_PORT=Serial
[env:node-debug-ota]
include = env:node-debug,ota
[env:sonoff-debug]
include = common
board = esp01_1m
build_flags = ${def.build_flags_debug} -DSONOFF
[env:sonoff-ota]
include = env:sonoff-debug,ota
build_flags = ${def.build_flags_ota} -DSONOFF
[env:sonoff-dht22-debug]
include = env:sonoff-debug
build_flags = ${def.build_flags_debug} -DSONOFF -DENABLE_DHT=1
[env:sonoff-ds18b20-debug]
include = env:sonoff-debug
build_flags = ${def.build_flags_debug} -DSONOFF -DENABLE_DS18B20=1
[env:sonoff-pow-debug]
include = common
board = esp01_1m
build_flags = ${def.build_flags_debug} -DSONOFF_POW
[env:sonoff-pow-ota]
include = env:sonoff-pow-debug,ota
build_flags = ${def.build_flags_ota} -DSONOFF_POW
[env:sonoff-dual-debug]
include = common
board = esp12e
build_flags = ${def.build_flags_debug} -DSONOFF_DUAL
[env:sonoff-dual-ota]
include = env:sonoff-dual-debug,ota
build_flags = ${def.build_flags_ota} -DSONOFF_DUAL
[env:slampher-debug]
include = common
board = esp01_1m
build_flags = ${def.build_flags_debug} -DSLAMPHER
[env:slampher-ota]
include = env:slampher-debug,ota
build_flags = ${def.build_flags_ota} -DSLAMPHER
[env:s20-debug]
include = common
board = esp01_1m
build_flags = ${def.build_flags_debug} -DS20
[env:s20-ota]
include = env:s20-debug,ota
build_flags = ${def.build_flags_ota} -DS20
[env:electrodragon-debug]
include = common
board = esp12e
build_flags = -g -DDEBUG_PORT=Serial -DESP_RELAY_BOARD -DENABLE_FAUXMO=1 -DENABLE_DHT=1
[env:electrodragon-ota]
include = env:electrodragon-debug,ota
build_flags = -DESP_RELAY_BOARD -DENABLE_FAUXMO=1 -DENABLE_DHT=1
# ------------------------------------------------------------------------------
[env:studio-lamp-device]
topic = /home/studio/lamp/ip
include = env:sonoff-debug-ota
platform = espressif8266_stage
build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DDEBUG_PORT=Serial -DSONOFF -DENABLE_FAUXMO=1
lib_ignore =
[env:living-lamp-device]
topic = /home/living/lamp/ip
include = env:s20-debug-ota
platform = espressif8266_stage
build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DDEBUG_PORT=Serial -DS20 -DENABLE_FAUXMO=1
lib_ignore =

Loading…
Cancel
Save