Add platformio floats removal

This commit is contained in:
arendst 2018-02-03 16:36:25 +01:00
parent 88429fb24c
commit 8dbf29efdd
2 changed files with 26 additions and 1 deletions

15
pio/strip-floats.py Normal file
View File

@ -0,0 +1,15 @@
Import('env')
#
# Dump build environment (for debug)
#print env.Dump()
#
flags = " ".join(env['LINKFLAGS'])
flags = flags.replace("-u _printf_float", "")
flags = flags.replace("-u _scanf_float", "")
newflags = flags.split()
env.Replace(
LINKFLAGS=newflags
)

View File

@ -29,6 +29,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -44,7 +45,7 @@ monitor_baud = 115200
; *** Upload file to OTA server using HTTP
;upload_port = domus1:80/api/upload-arduino.php
;extra_scripts = pio/http-uploader.py
;extra_scripts = pio/strip-floats.py, pio/http-uploader.py
[env:sonoff-DE]
platform = espressif8266
@ -53,6 +54,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=de-DE
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -64,6 +66,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=es-AR
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -75,6 +78,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=fr-FR
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -86,6 +90,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=it-IT
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -97,6 +102,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=nl-NL
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -108,6 +114,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=pl-PL
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -119,6 +126,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=zh-CN
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; *** Serial Monitor options
monitor_baud = 115200
@ -130,6 +138,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DBE_MINIMAL
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; Serial Monitor options
monitor_baud = 115200
@ -141,6 +150,7 @@ board = esp01_1m
board_flash_mode = dout
build_flags = -Wl,-Tesp8266.flash.1m0.ld -DUSE_DS18x20
lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON
extra_scripts = pio/strip-floats.py
; Serial Monitor options
monitor_baud = 115200