From 47e2847e79b0bf15ea910dc8bf280fde330b190d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Fri, 21 Jul 2017 13:32:20 +0200 Subject: [PATCH] Cleanup gulp files --- code/esp8266.flash.1m0.ld | 18 +++++++ code/gulpfile.js | 10 +--- code/pio_hooks.py | 11 ---- code/platformio.ini | 102 +++++++++++--------------------------- 4 files changed, 49 insertions(+), 92 deletions(-) create mode 100644 code/esp8266.flash.1m0.ld delete mode 100644 code/pio_hooks.py diff --git a/code/esp8266.flash.1m0.ld b/code/esp8266.flash.1m0.ld new file mode 100644 index 00000000..1f9b56a8 --- /dev/null +++ b/code/esp8266.flash.1m0.ld @@ -0,0 +1,18 @@ +/* Flash Split for 1M chips */ +/* sketch 999KB */ +/* eeprom 20KB */ + +MEMORY +{ + dport0_0_seg : org = 0x3FF00000, len = 0x10 + dram0_0_seg : org = 0x3FFE8000, len = 0x14000 + iram1_0_seg : org = 0x40100000, len = 0x8000 + irom0_0_seg : org = 0x40201010, len = 0xf9ff0 +} + +PROVIDE ( _SPIFFS_start = 0x402FB000 ); +PROVIDE ( _SPIFFS_end = 0x402FB000 ); +PROVIDE ( _SPIFFS_page = 0 ); +PROVIDE ( _SPIFFS_block = 0 ); + +INCLUDE "esp8266.flash.common.ld" diff --git a/code/gulpfile.js b/code/gulpfile.js index 3a7d656f..91f31070 100644 --- a/code/gulpfile.js +++ b/code/gulpfile.js @@ -2,7 +2,7 @@ ESP8266 file system builder -Copyright (C) 2016 by Xose Pérez +Copyright (C) 2016-2017 by Xose Pérez This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,14 +41,6 @@ gulp.task('clean', function() { return true; }); -gulp.task('files', ['clean'], function() { - return gulp.src([ - 'html/**/*.{jpg,jpeg,png,ico,gif}', - 'html/fsversion' - ]) - .pipe(gulp.dest(dataFolder)); -}); - gulp.task('buildfs_embeded', ['buildfs_inline'], function() { var source = dataFolder + 'index.html.gz'; diff --git a/code/pio_hooks.py b/code/pio_hooks.py deleted file mode 100644 index e6037ad8..00000000 --- a/code/pio_hooks.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/python - -import subprocess -import socket -from SCons.Script import DefaultEnvironment -env = DefaultEnvironment() - -def before_build_spiffs(source, target, env): - env.Execute("node node_modules/gulp/bin/gulp.js") - -env.AddPreAction(".pioenvs/%s/spiffs.bin" % env['PIOENV'], before_build_spiffs) diff --git a/code/platformio.ini b/code/platformio.ini index 18b4fed4..53322d05 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -5,7 +5,8 @@ data_dir = espurna/data [common] build_flags = -g -DDEBUG_PORT=Serial -DMQTT_MAX_PACKET_SIZE=400 -build_flags_1m128 = ${common.build_flags} -Wl,-Tesp8266.flash.1m128.ld +build_flags_512k = ${common.build_flags} -Wl,-Tesp8266.flash.512k0.ld +build_flags_1m = ${common.build_flags} -Wl,-Tesp8266.flash.1m0.ld lib_deps = DHT sensor library Adafruit Unified Sensor @@ -37,7 +38,6 @@ framework = arduino board = d1_mini lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DD1_MINI -DENABLE_DS18B20=1 -DDS_PIN=14 -DENABLE_ADC_VCC=0 -DMQTT_USE_ASYNC=0 -DENABLE_ANALOG=1 -DNOWSAUTH [env:d1-debug] @@ -46,7 +46,6 @@ framework = arduino board = d1_mini lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH [env:d1-debug-ota] @@ -55,7 +54,6 @@ framework = arduino board = d1_mini lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DD1_RELAYSHIELD -DDEBUG_FAUXMO=Serial -DNOWSAUTH upload_speed = 115200 upload_port = "192.168.4.1" @@ -67,7 +65,6 @@ framework = arduino board = nodemcuv2 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH [env:node-debug-ota] @@ -76,7 +73,6 @@ framework = arduino board = nodemcuv2 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DNODEMCUV2 -DDEBUG_FAUXMO=Serial -DNOWSAUTH upload_speed = 115200 upload_port = "192.168.4.1" @@ -88,7 +84,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DESPURNA_H [env:espurna-debug-ota] @@ -97,7 +92,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DESPURNA_H upload_speed = 115200 upload_port = "192.168.4.1" @@ -109,8 +103,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF +build_flags = ${common.build_flags_1m} -DSONOFF [env:sonoff-debug-ota] platform = espressif8266 @@ -118,8 +111,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF +build_flags = ${common.build_flags_1m} -DSONOFF upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -130,8 +122,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF -DENABLE_DHT=1 +build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DHT=1 [env:sonoff-ds18b20-debug] platform = espressif8266 @@ -139,8 +130,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF -DENABLE_DS18B20=1 +build_flags = ${common.build_flags_1m} -DSONOFF -DENABLE_DS18B20=1 [env:sonoff-pow-debug] platform = espressif8266 @@ -148,8 +138,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_POW +build_flags = ${common.build_flags_1m} -DSONOFF_POW [env:sonoff-pow-debug-ota] platform = espressif8266 @@ -157,8 +146,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_POW +build_flags = ${common.build_flags_1m} -DSONOFF_POW upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -169,8 +157,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_DUAL +build_flags = ${common.build_flags_1m} -DSONOFF_DUAL [env:sonoff-dual-debug-ota] platform = espressif8266 @@ -178,8 +165,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_DUAL +build_flags = ${common.build_flags_1m} -DSONOFF_DUAL upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -190,8 +176,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_4CH +build_flags = ${common.build_flags_1m} -DSONOFF_4CH [env:sonoff-4ch-debug-ota] platform = espressif8266 @@ -199,8 +184,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_4CH +build_flags = ${common.build_flags_1m} -DSONOFF_4CH upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -211,8 +195,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_TOUCH +build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH [env:sonoff-touch-debug-ota] platform = espressif8266 @@ -220,8 +203,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSONOFF_TOUCH +build_flags = ${common.build_flags_1m} -DSONOFF_TOUCH upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -232,8 +214,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSLAMPHER +build_flags = ${common.build_flags_1m} -DSLAMPHER [env:slampher-debug-ota] platform = espressif8266 @@ -241,8 +222,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DSLAMPHER +build_flags = ${common.build_flags_1m} -DSLAMPHER upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -253,8 +233,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DS20 +build_flags = ${common.build_flags_1m} -DS20 [env:s20-debug-ota] platform = espressif8266 @@ -262,8 +241,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DS20 +build_flags = ${common.build_flags_1m} -DS20 upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -274,8 +252,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DITEAD_1CH_INCHING +build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING [env:1ch-inching-debug-ota] platform = espressif8266 @@ -283,8 +260,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DITEAD_1CH_INCHING +build_flags = ${common.build_flags_1m} -DITEAD_1CH_INCHING upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -295,8 +271,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DITEAD_MOTOR +build_flags = ${common.build_flags_1m} -DITEAD_MOTOR [env:motor-debug-ota] platform = espressif8266 @@ -304,8 +279,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DITEAD_MOTOR +build_flags = ${common.build_flags_1m} -DITEAD_MOTOR upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -316,7 +290,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1 [env:electrodragon-debug-ota] @@ -325,7 +298,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DESP_RELAY_BOARD -DENABLE_DHT=1 upload_speed = 115200 upload_port = "192.168.4.1" @@ -337,8 +309,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DECOPLUG +build_flags = ${common.build_flags_1m} -DECOPLUG [env:ecoplug-debug-ota] platform = espressif8266 @@ -346,8 +317,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DECOPLUG +build_flags = ${common.build_flags_1m} -DECOPLUG upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -358,7 +328,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DWIFI_RELAY_NC [env:jangoe-debug-ota] @@ -367,7 +336,6 @@ framework = arduino board = esp12e lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DWIFI_RELAY_NC upload_speed = 115200 upload_port = "192.168.4.1" @@ -379,7 +347,6 @@ framework = arduino board = esp_wroom_02 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1 [env:mqtt-relay-debug-ota] @@ -388,7 +355,6 @@ framework = arduino board = esp_wroom_02 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = ${common.build_flags} -DMQTT_RELAY -DENABLE_DS18B20=1 upload_speed = 115200 upload_port = "192.168.4.1" @@ -400,8 +366,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT +build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT [env:wifi-relays-debug-ota] platform = espressif8266 @@ -409,8 +374,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DWIFI_RELAYS_BOARD_KIT +build_flags = ${common.build_flags_1m} -DWIFI_RELAYS_BOARD_KIT upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -421,8 +385,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DAI_LIGHT +build_flags = ${common.build_flags_1m} -DAI_LIGHT [env:ai-light-debug-ota] platform = espressif8266 @@ -430,8 +393,7 @@ framework = arduino board = esp8285 lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DAI_LIGHT +build_flags = ${common.build_flags_1m} -DAI_LIGHT upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -442,8 +404,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER +build_flags = ${common.build_flags_1m} -DLED_CONTROLLER [env:led-controller-debug-ota] platform = espressif8266 @@ -451,8 +412,7 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py -build_flags = ${common.build_flags_1m128} -DLED_CONTROLLER +build_flags = ${common.build_flags_1m} -DLED_CONTROLLER upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 @@ -463,7 +423,6 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1 [env:h801-debug-ota] @@ -472,7 +431,6 @@ framework = arduino board = esp01_1m lib_deps = ${common.lib_deps} lib_ignore = ${common.lib_ignore} -extra_script = pio_hooks.py build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DH801_LED_CONTROLLER -DDEBUG_PORT=Serial1 upload_speed = 115200 upload_port = "192.168.4.1"