Browse Source

Cleanup gulp files

fastled
Xose Pérez 7 years ago
parent
commit
47e2847e79
4 changed files with 49 additions and 92 deletions
  1. +18
    -0
      code/esp8266.flash.1m0.ld
  2. +1
    -9
      code/gulpfile.js
  3. +0
    -11
      code/pio_hooks.py
  4. +30
    -72
      code/platformio.ini

+ 18
- 0
code/esp8266.flash.1m0.ld View File

@ -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"

+ 1
- 9
code/gulpfile.js View File

@ -2,7 +2,7 @@
ESP8266 file system builder
Copyright (C) 2016 by Xose Pérez <xose dot perez at gmail dot com>
Copyright (C) 2016-2017 by Xose Pérez <xose dot perez at gmail dot com>
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';


+ 0
- 11
code/pio_hooks.py View File

@ -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)

+ 30
- 72
code/platformio.ini View File

@ -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"


Loading…
Cancel
Save