Skip to content

Commit

Permalink
Prep for release 6.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Dec 22, 2018
1 parent 173c19d commit c6ed4b0
Show file tree
Hide file tree
Showing 80 changed files with 8,920 additions and 520 deletions.
11 changes: 11 additions & 0 deletions RELEASENOTES.md
Expand Up @@ -184,6 +184,17 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
| USE_DISPLAY | - | - | - | - | - | - |

## Changelog
Version 6.4.1 20181223
* Change RAM usage BMP/BME I2C sensors
* Change FallbackTopic detection (#4706)
* Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
* Fix possible dtostrf buffer overflows by increasing buffers
* Fix wifi strongest signal detection (#4704)
* Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
* Add support for AZ-Instrument 7798 CO2 meter/datalogger (#4672)
* Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
* Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (#4703)

Version 6.4.0 20181217
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%.
In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R)
Expand Down
6,086 changes: 6,086 additions & 0 deletions arduino/version 2.5.0/boards.txt

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions arduino/version 2.5.0/platform.txt
@@ -0,0 +1,156 @@

# ESP8266 platform
# ------------------------------

# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

name=ESP8266 Boards (2.5.0-beta2)
version=2.5.0-beta2



runtime.tools.signing={runtime.platform.path}/tools/signing.py

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra

build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include
build.lwip_flags=-DLWIP_OPEN_SRC

build.vtable_flags=-DVTABLES_IN_FLASH

#build.exception_flags=-fexceptions
build.exception_flags=-fno-exceptions
#build.stdcpp_lib=-lstdc++
build.stdcpp_lib=-lstdc++-nox

#build.float=-u _printf_float -u _scanf_float
build.float=
build.led=

compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk
compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"

compiler.c.cmd=xtensa-lx106-elf-gcc
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 {build.exception_flags} -ffunction-sections -fdata-sections {build.exception_flags}

compiler.S.cmd=xtensa-lx106-elf-gcc
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls

compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u app_entry {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read

compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 {build.stdcpp_lib} -lm -lc -lgcc

compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections {build.exception_flags}

compiler.as.cmd=xtensa-lx106-elf-as

compiler.ar.cmd=xtensa-lx106-elf-ar
compiler.ar.flags=cru

compiler.elf2hex.cmd=esptool
compiler.elf2hex.flags=

compiler.size.cmd=xtensa-lx106-elf-size

compiler.esptool.cmd=esptool
compiler.esptool.cmd.windows=esptool.exe

# This can be overriden in boards.txt
build.extra_flags=-DESP8266

# These can be overridden in platform.local.txt
compiler.c.extra_flags=
compiler.c.elf.extra_flags=
compiler.S.extra_flags=
compiler.cpp.extra_flags=
compiler.ar.extra_flags=
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=

## generate file with git version number
## needs bash, git, and echo
recipe.hooks.core.prebuild.1.pattern=python "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"



## windows-compatible version without git
recipe.hooks.core.prebuild.1.pattern.windows=cmd.exe /c rem cannot sign on windows



## Build the app.ld linker file
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"

## Create eeprom
recipe.objcopy.eep.pattern=

## Create hex
#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"

recipe.objcopy.hex.1.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{runtime.platform.path}/bootloaders/eboot/eboot.elf" -bo "{build.path}/{build.project_name}.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bp 4096 -ec -eo "{build.path}/{build.project_name}.elf" -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec
recipe.objcopy.hex.2.pattern=python "{runtime.tools.signing}" --mode sign --privatekey "{build.source.path}/private.key" --bin "{build.path}/{build.project_name}.bin" --out "{build.path}/{build.project_name}.bin.signed"

# No signing on Windows
recipe.objcopy.hex.1.pattern.windows="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{runtime.platform.path}/bootloaders/eboot/eboot.elf" -bo "{build.path}/{build.project_name}.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bp 4096 -ec -eo "{build.path}/{build.project_name}.elf" -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec
recipe.objcopy.hex.2.pattern.windows=

## Save hex
recipe.output.tmp_file={build.project_name}.bin
recipe.output.save_file={build.project_name}.{build.variant}.bin

## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.irom0\.text|\.text|\.data|\.rodata|)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*
#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*

# ------------------------------

tools.esptool.cmd=esptool
tools.esptool.cmd.windows=esptool.exe
tools.esptool.path={runtime.tools.esptool.path}
tools.esptool.network_cmd=python
tools.esptool.network_cmd.windows=python.exe

tools.esptool.upload.protocol=esp
tools.esptool.upload.params.verbose=-vv
tools.esptool.upload.params.quiet=
tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" {upload.erase_cmd} -ca 0x00000 -cf "{build.path}/{build.project_name}.bin"
tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/tools/espota.py" -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"

tools.mkspiffs.cmd=mkspiffs
tools.mkspiffs.cmd.windows=mkspiffs.exe
tools.mkspiffs.path={runtime.tools.mkspiffs.path}

tools.espupload.cmd=python
tools.espupload.cmd.windows=python.exe
tools.espupload.path={runtime.platform.path}/tools
tools.espupload.upload.protocol=espupload
tools.espupload.upload.params.verbose=
tools.espupload.upload.params.quiet=
tools.espupload.upload.pattern="{cmd}" "{path}/espupload.py" -f "{build.path}/{build.project_name}.bin"
169 changes: 124 additions & 45 deletions platformio.ini
Expand Up @@ -34,67 +34,132 @@ src_dir = sonoff
;env_default = sonoff-PT
;env_default = sonoff-RU
;env_default = sonoff-SE
;env_default = sonoff-SK
;env_default = sonoff-TR
;env_default = sonoff-TW
;env_default = sonoff-UK

[common] ; ************************************************************
[esp82xx_defaults]
build_flags = -D NDEBUG
-mtarget-align
-Wl,-Map,firmware.map

[core_2_3_0]
; *** Esp8266 core for Arduino version 2.3.0
;platform = espressif8266@1.5.0
platform = espressif8266@1.5.0
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m0.ld

[core_2_4_2]
; *** Esp8266 core for Arduino version 2.4.2
platform = espressif8266@1.8.0
platform = espressif8266@1.8.0
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m0.ld
-lstdc++ -lsupc++
; lwIP 1.4 (Default)
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
-DVTABLES_IN_FLASH

[core_2_5_0]
; *** Esp8266 core for Arduino version Core 2.5.0 beta tested for Tasmota
platform = https://github.com/Jason2866/platform-espressif8266.git#Tasmota
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m.ld
; lwIP 1.4 (Default)
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
-DVTABLES_IN_FLASH
-fno-exceptions
-lstdc++-nox

[core_stage]
; *** Esp8266 core for Arduino version latest beta
;platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
; *** Esp8266 core for Arduino current version (located in %USERPROFILE%\.platformio\platforms\espressif8266)
;platform = espressif8266
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m.ld
; lwIP 1.4 (Default)
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwitdh Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwitdh no Features
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; VTABLES in Flash (default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
; VTABLES in IRAM
; -DVTABLES_IN_IRAM
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++-nox
; Exception code in firmware /needs much space! 90k
; -fexceptions
; -lstdc++

[core_active]
; Select one core set for platform and build_flags
;platform = ${core_2_3_0.platform}
;build_flags = ${core_2_3_0.build_flags}
platform = ${core_2_4_2.platform}
build_flags = ${core_2_4_2.build_flags}
;platform = ${core_2_5_0.platform}
;build_flags = ${core_2_5_0.build_flags}
;platform = ${core_stage.platform}
;build_flags = ${core_stage.build_flags}

[common]
framework = arduino
board = esp01_1m
board_build.flash_mode = dout

platform = ${core_active.platform}
build_flags = ${core_active.build_flags}
; -DUSE_CLASSIC
; -DBE_MINIMAL
; -DUSE_SENSORS
; -DUSE_BASIC
; -DUSE_KNX_NO_EMULATION
; -DUSE_DISPLAYS
; -DUSE_CONFIG_OVERRIDE

framework = arduino
board = esp01_1m
board_build.flash_mode = dout
; *** Fix espressif8266@1.7.0 induced undesired all warnings
build_unflags = -Wall

; set CPU frequency to 80MHz (default) or 160MHz
board_build.f_cpu = 80000000L
;board_build.f_cpu = 160000000L

; *** Fix espressif8266@1.7.0 induced undesired all warnings
build_unflags = -Wall

build_flags =
; if using esp8266 core 2.5.0 (stage) or up
; -Wl,-Tesp8266.flash.1m.ld -Wl,-Map,firmware.map
; if using esp8266 core < 2.5.0
-Wl,-Tesp8266.flash.1m0.ld -Wl,-Map,firmware.map
-mtarget-align
; -DUSE_CONFIG_OVERRIDE
; lwIP 2 - Higher Bandwitdh (core 2.4.2)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwitdh no Features (core 2.5.0)
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
-DVTABLES_IN_FLASH

; if using esp8266 core 2.5.0 (stage) or up
; No exception code in firmware
; -fno-exceptions
; -lstdc++-nox
board_build.f_cpu = 80000000L
;board_build.f_cpu = 160000000L

; *** Serial Monitor options
monitor_speed = 115200
monitor_speed = 115200
upload_speed = 115200
upload_resetmethod = nodemcu

; *** Upload Serial reset method for Wemos and NodeMCU
upload_speed = 115200
upload_resetmethod = nodemcu
upload_port = COM5

; *** Fix Esp/Arduino core 2.4.x induced Tasmota unused floating point includes
extra_scripts = pio/strip-floats.py
upload_port = COM5
extra_scripts = pio/strip-floats.py

; *** Upload file to OTA server using SCP
;upload_port = user@host:/path
;extra_scripts = pio/strip-floats.py, pio/sftp-uploader.py
;upload_port = user@host:/path
;extra_scripts = pio/strip-floats.py, pio/sftp-uploader.py

; *** Upload file to OTA server using HTTP
;upload_port = domus1:80/api/upload-arduino.php
;extra_scripts = pio/strip-floats.py, pio/http-uploader.py
; *** Upload file to OTA server in folder api/arduino using HTTP
;upload_port = domus1:80/api/upload-arduino.php
;extra_scripts = pio/strip-floats.py, pio/http-uploader.py

; *********************************************************************

Expand Down Expand Up @@ -420,6 +485,20 @@ upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
extra_scripts = ${common.extra_scripts}

[env:sonoff-SK]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} -DMY_LANGUAGE=sk-SK
monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
extra_scripts = ${common.extra_scripts}

[env:sonoff-TR]
platform = ${common.platform}
framework = ${common.framework}
Expand Down
13 changes: 12 additions & 1 deletion sonoff/_changelog.ino
@@ -1,4 +1,15 @@
/* 6.4.0 20181217
/* 6.4.1 20181223
* Change RAM usage BMP/BME I2C sensors
* Change FallbackTopic detection (#4706)
* Change Hass discovery to short MQTT messages as used by Hass 0.81 and up (#4711)
* Fix possible dtostrf buffer overflows by increasing buffers
* Fix wifi strongest signal detection (#4704)
* Fix Alexa "this value is outside the range of the device". Needs power cycle and Alexa deletion/discovery cycle. (#3159, #4712)
* Add support for AZ-Instrument 7798 CO2 meter/datalogger (#4672)
* Add define WIFI_SOFT_AP_CHANNEL in my_user_config.h to set Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI (#4673)
* Add define USE_MQTT_TLS_CA_CERT for checking MQTT TLS against root ca using Let's Encrypt cert from sonoff_letsencrypt.h - not supported with core 2.3.0 (#4703)
*
* 6.4.0 20181217
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%
In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R)
* Change enforcing flashmode dout but it is still mandatory
Expand Down

0 comments on commit c6ed4b0

Please sign in to comment.