diff --git a/boards.txt b/boards.txt index c6e34b3f88..f19cc72b6b 100644 --- a/boards.txt +++ b/boards.txt @@ -5,6 +5,8 @@ # menu.BoardModel=Model +menu.ESPModule=Module +menu.led=Builtin Led menu.baud=Upload Speed menu.xtal=CPU Frequency menu.CrystalFreq=Crystal Frequency @@ -12,13 +14,11 @@ menu.eesz=Flash Size menu.FlashMode=Flash Mode menu.FlashFreq=Flash Frequency menu.ResetMethod=Reset Method -menu.ESPModule=Module menu.dbg=Debug port menu.lvl=Debug Level menu.ip=lwIP Variant menu.vt=VTables menu.exception=Exceptions -menu.led=Builtin Led menu.wipe=Erase Flash menu.sdk=Espressif FW menu.ssl=SSL Support @@ -6629,3 +6629,480 @@ espectro.menu.baud.921600.upload.speed=921600 espectro.menu.baud.3000000=3000000 espectro.menu.baud.3000000.upload.speed=3000000 +############################################################## +sonoff.name=ITEAD Sonoff +sonoff.build.board=SONOFF_SV +sonoff.build.extra_flags=-DESP8266 +sonoff.build.flash_size=1M +sonoff.build.variant=itead +sonoff.menu.BoardModel.sonoffBasic=ITEAD Sonoff Basic +sonoff.menu.BoardModel.sonoffBasic.build.board=SONOFF_BASIC +sonoff.menu.BoardModel.sonoffS20=ITEAD Sonoff S20 +sonoff.menu.BoardModel.sonoffS20.build.board=SONOFF_S20 +sonoff.menu.BoardModel.sonoffSV=ITEAD Sonoff SV +sonoff.menu.BoardModel.sonoffSV.build.board=SONOFF_SV +sonoff.menu.BoardModel.sonoffTH=ITEAD Sonoff TH +sonoff.menu.BoardModel.sonoffTH.build.board=SONOFF_TH +sonoff.upload.tool=esptool +sonoff.upload.maximum_data_size=81920 +sonoff.upload.wait_for_upload_port=true +sonoff.upload.erase_cmd=flash_id +sonoff.serial.disableDTR=true +sonoff.serial.disableRTS=true +sonoff.build.mcu=esp8266 +sonoff.build.core=esp8266 +sonoff.build.spiffs_pagesize=256 +sonoff.build.debug_port= +sonoff.build.debug_level= +sonoff.menu.xtal.80=80 MHz +sonoff.menu.xtal.80.build.f_cpu=80000000L +sonoff.menu.xtal.160=160 MHz +sonoff.menu.xtal.160.build.f_cpu=160000000L +sonoff.menu.vt.flash=Flash +sonoff.menu.vt.flash.build.vtable_flags=-DVTABLES_IN_FLASH +sonoff.menu.vt.heap=Heap +sonoff.menu.vt.heap.build.vtable_flags=-DVTABLES_IN_DRAM +sonoff.menu.vt.iram=IRAM +sonoff.menu.vt.iram.build.vtable_flags=-DVTABLES_IN_IRAM +sonoff.menu.exception.legacy=Legacy (new can return nullptr) +sonoff.menu.exception.legacy.build.exception_flags=-fno-exceptions +sonoff.menu.exception.legacy.build.stdcpp_lib=-lstdc++ +sonoff.menu.exception.disabled=Disabled (new can abort) +sonoff.menu.exception.disabled.build.exception_flags=-fno-exceptions -DNEW_OOM_ABORT +sonoff.menu.exception.disabled.build.stdcpp_lib=-lstdc++ +sonoff.menu.exception.enabled=Enabled +sonoff.menu.exception.enabled.build.exception_flags=-fexceptions +sonoff.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +sonoff.menu.ssl.all=All SSL ciphers (most compatible) +sonoff.menu.ssl.all.build.sslflags= +sonoff.menu.ssl.basic=Basic SSL ciphers (lower ROM use) +sonoff.menu.ssl.basic.build.sslflags=-DBEARSSL_SSL_BASIC +sonoff.upload.resetmethod=--before no_reset --after soft_reset +sonoff.build.flash_mode=dout +sonoff.build.flash_flags=-DFLASHMODE_DOUT +sonoff.build.flash_freq=40 +sonoff.menu.eesz.1M64=1MB (FS:64KB OTA:~470KB) +sonoff.menu.eesz.1M64.build.flash_size=1M +sonoff.menu.eesz.1M64.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M64.build.flash_ld=eagle.flash.1m64.ld +sonoff.menu.eesz.1M64.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M64.upload.maximum_size=958448 +sonoff.menu.eesz.1M64.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M64.build.spiffs_start=0xEB000 +sonoff.menu.eesz.1M64.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M64.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M128=1MB (FS:128KB OTA:~438KB) +sonoff.menu.eesz.1M128.build.flash_size=1M +sonoff.menu.eesz.1M128.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M128.build.flash_ld=eagle.flash.1m128.ld +sonoff.menu.eesz.1M128.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M128.upload.maximum_size=892912 +sonoff.menu.eesz.1M128.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M128.build.spiffs_start=0xDB000 +sonoff.menu.eesz.1M128.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M128.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M144=1MB (FS:144KB OTA:~430KB) +sonoff.menu.eesz.1M144.build.flash_size=1M +sonoff.menu.eesz.1M144.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M144.build.flash_ld=eagle.flash.1m144.ld +sonoff.menu.eesz.1M144.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M144.upload.maximum_size=876528 +sonoff.menu.eesz.1M144.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M144.build.spiffs_start=0xD7000 +sonoff.menu.eesz.1M144.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M144.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M160=1MB (FS:160KB OTA:~422KB) +sonoff.menu.eesz.1M160.build.flash_size=1M +sonoff.menu.eesz.1M160.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M160.build.flash_ld=eagle.flash.1m160.ld +sonoff.menu.eesz.1M160.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M160.upload.maximum_size=860144 +sonoff.menu.eesz.1M160.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M160.build.spiffs_start=0xD3000 +sonoff.menu.eesz.1M160.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M160.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M192=1MB (FS:192KB OTA:~406KB) +sonoff.menu.eesz.1M192.build.flash_size=1M +sonoff.menu.eesz.1M192.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M192.build.flash_ld=eagle.flash.1m192.ld +sonoff.menu.eesz.1M192.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M192.upload.maximum_size=827376 +sonoff.menu.eesz.1M192.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M192.build.spiffs_start=0xCB000 +sonoff.menu.eesz.1M192.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M192.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M256=1MB (FS:256KB OTA:~374KB) +sonoff.menu.eesz.1M256.build.flash_size=1M +sonoff.menu.eesz.1M256.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M256.build.flash_ld=eagle.flash.1m256.ld +sonoff.menu.eesz.1M256.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M256.upload.maximum_size=761840 +sonoff.menu.eesz.1M256.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M256.build.spiffs_start=0xBB000 +sonoff.menu.eesz.1M256.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M256.build.spiffs_blocksize=4096 +sonoff.menu.eesz.1M512=1MB (FS:512KB OTA:~246KB) +sonoff.menu.eesz.1M512.build.flash_size=1M +sonoff.menu.eesz.1M512.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M512.build.flash_ld=eagle.flash.1m512.ld +sonoff.menu.eesz.1M512.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M512.upload.maximum_size=499696 +sonoff.menu.eesz.1M512.build.rfcal_addr=0xFC000 +sonoff.menu.eesz.1M512.build.spiffs_start=0x7B000 +sonoff.menu.eesz.1M512.build.spiffs_end=0xFB000 +sonoff.menu.eesz.1M512.build.spiffs_blocksize=8192 +sonoff.menu.eesz.1M=1MB (FS:none OTA:~502KB) +sonoff.menu.eesz.1M.build.flash_size=1M +sonoff.menu.eesz.1M.build.flash_size_bytes=0x100000 +sonoff.menu.eesz.1M.build.flash_ld=eagle.flash.1m.ld +sonoff.menu.eesz.1M.build.spiffs_pagesize=256 +sonoff.menu.eesz.1M.upload.maximum_size=1023984 +sonoff.menu.eesz.1M.build.rfcal_addr=0xFC000 +sonoff.menu.ip.lm2f=v2 Lower Memory +sonoff.menu.ip.lm2f.build.lwip_include=lwip2/include +sonoff.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat +sonoff.menu.ip.lm2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 +sonoff.menu.ip.hb2f=v2 Higher Bandwidth +sonoff.menu.ip.hb2f.build.lwip_include=lwip2/include +sonoff.menu.ip.hb2f.build.lwip_lib=-llwip2-1460-feat +sonoff.menu.ip.hb2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 +sonoff.menu.ip.lm2n=v2 Lower Memory (no features) +sonoff.menu.ip.lm2n.build.lwip_include=lwip2/include +sonoff.menu.ip.lm2n.build.lwip_lib=-llwip2-536 +sonoff.menu.ip.lm2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=0 -DLWIP_IPV6=0 +sonoff.menu.ip.hb2n=v2 Higher Bandwidth (no features) +sonoff.menu.ip.hb2n.build.lwip_include=lwip2/include +sonoff.menu.ip.hb2n.build.lwip_lib=-llwip2-1460 +sonoff.menu.ip.hb2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=0 -DLWIP_IPV6=0 +sonoff.menu.ip.lm6f=v2 IPv6 Lower Memory +sonoff.menu.ip.lm6f.build.lwip_include=lwip2/include +sonoff.menu.ip.lm6f.build.lwip_lib=-llwip6-536-feat +sonoff.menu.ip.lm6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 +sonoff.menu.ip.hb6f=v2 IPv6 Higher Bandwidth +sonoff.menu.ip.hb6f.build.lwip_include=lwip2/include +sonoff.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat +sonoff.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 +sonoff.menu.ip.hb1=v1.4 Higher Bandwidth +sonoff.menu.ip.hb1.build.lwip_lib=-llwip_gcc +sonoff.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC +sonoff.menu.ip.src=v1.4 Compile from source +sonoff.menu.ip.src.build.lwip_lib=-llwip_src +sonoff.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC +sonoff.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" +sonoff.menu.dbg.Disabled=Disabled +sonoff.menu.dbg.Disabled.build.debug_port= +sonoff.menu.dbg.Serial=Serial +sonoff.menu.dbg.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial +sonoff.menu.dbg.Serial1=Serial1 +sonoff.menu.dbg.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 +sonoff.menu.lvl.None____=None +sonoff.menu.lvl.None____.build.debug_level= +sonoff.menu.lvl.SSL=SSL +sonoff.menu.lvl.SSL.build.debug_level= -DDEBUG_ESP_SSL +sonoff.menu.lvl.TLS_MEM=TLS_MEM +sonoff.menu.lvl.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM +sonoff.menu.lvl.HTTP_CLIENT=HTTP_CLIENT +sonoff.menu.lvl.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT +sonoff.menu.lvl.HTTP_SERVER=HTTP_SERVER +sonoff.menu.lvl.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.SSLTLS_MEM=SSL+TLS_MEM +sonoff.menu.lvl.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM +sonoff.menu.lvl.SSLHTTP_CLIENT=SSL+HTTP_CLIENT +sonoff.menu.lvl.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT +sonoff.menu.lvl.SSLHTTP_SERVER=SSL+HTTP_SERVER +sonoff.menu.lvl.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT +sonoff.menu.lvl.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT +sonoff.menu.lvl.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER +sonoff.menu.lvl.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER +sonoff.menu.lvl.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT +sonoff.menu.lvl.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER +sonoff.menu.lvl.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER +sonoff.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER +sonoff.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +sonoff.menu.lvl.CORE=CORE +sonoff.menu.lvl.CORE.build.debug_level= -DDEBUG_ESP_CORE +sonoff.menu.lvl.WIFI=WIFI +sonoff.menu.lvl.WIFI.build.debug_level= -DDEBUG_ESP_WIFI +sonoff.menu.lvl.HTTP_UPDATE=HTTP_UPDATE +sonoff.menu.lvl.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE +sonoff.menu.lvl.UPDATER=UPDATER +sonoff.menu.lvl.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER +sonoff.menu.lvl.OTA=OTA +sonoff.menu.lvl.OTA.build.debug_level= -DDEBUG_ESP_OTA +sonoff.menu.lvl.OOM=OOM +sonoff.menu.lvl.OOM.build.debug_level= -DDEBUG_ESP_OOM +sonoff.menu.lvl.MDNS=MDNS +sonoff.menu.lvl.MDNS.build.debug_level= -DDEBUG_ESP_MDNS +sonoff.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS +sonoff.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -DDEBUG_ESP_MDNS +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS +sonoff.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -DDEBUG_ESP_MDNS +sonoff.menu.lvl.NoAssert-NDEBUG=NoAssert-NDEBUG +sonoff.menu.lvl.NoAssert-NDEBUG.build.debug_level= -DNDEBUG +sonoff.menu.wipe.none=Only Sketch +sonoff.menu.wipe.none.upload.erase_cmd=flash_id +sonoff.menu.wipe.sdk=Sketch + WiFi Settings +sonoff.menu.wipe.sdk.upload.erase_cmd=erase_region "{build.rfcal_addr}" 0x4000 +sonoff.menu.wipe.all=All Flash Contents +sonoff.menu.wipe.all.upload.erase_cmd=erase_flash +sonoff.menu.baud.115200=115200 +sonoff.menu.baud.115200.upload.speed=115200 +sonoff.menu.baud.57600=57600 +sonoff.menu.baud.57600.upload.speed=57600 +sonoff.menu.baud.230400.linux=230400 +sonoff.menu.baud.230400.macosx=230400 +sonoff.menu.baud.230400.upload.speed=230400 +sonoff.menu.baud.256000.windows=256000 +sonoff.menu.baud.256000.upload.speed=256000 +sonoff.menu.baud.460800.linux=460800 +sonoff.menu.baud.460800.macosx=460800 +sonoff.menu.baud.460800.upload.speed=460800 +sonoff.menu.baud.512000.windows=512000 +sonoff.menu.baud.512000.upload.speed=512000 +sonoff.menu.baud.921600=921600 +sonoff.menu.baud.921600.upload.speed=921600 +sonoff.menu.baud.3000000=3000000 +sonoff.menu.baud.3000000.upload.speed=3000000 + +############################################################## +espmxdevkit.name=DOIT ESP-Mx DevKit (ESP8285) +espmxdevkit.build.board=ESP8266_ESP01 +espmxdevkit.build.led=-DLED_BUILTIN=16 +espmxdevkit.build.variant=esp8285 +espmxdevkit.upload.tool=esptool +espmxdevkit.upload.maximum_data_size=81920 +espmxdevkit.upload.wait_for_upload_port=true +espmxdevkit.upload.erase_cmd=flash_id +espmxdevkit.serial.disableDTR=true +espmxdevkit.serial.disableRTS=true +espmxdevkit.build.mcu=esp8266 +espmxdevkit.build.core=esp8266 +espmxdevkit.build.spiffs_pagesize=256 +espmxdevkit.build.debug_port= +espmxdevkit.build.debug_level= +espmxdevkit.menu.xtal.80=80 MHz +espmxdevkit.menu.xtal.80.build.f_cpu=80000000L +espmxdevkit.menu.xtal.160=160 MHz +espmxdevkit.menu.xtal.160.build.f_cpu=160000000L +espmxdevkit.menu.vt.flash=Flash +espmxdevkit.menu.vt.flash.build.vtable_flags=-DVTABLES_IN_FLASH +espmxdevkit.menu.vt.heap=Heap +espmxdevkit.menu.vt.heap.build.vtable_flags=-DVTABLES_IN_DRAM +espmxdevkit.menu.vt.iram=IRAM +espmxdevkit.menu.vt.iram.build.vtable_flags=-DVTABLES_IN_IRAM +espmxdevkit.menu.exception.legacy=Legacy (new can return nullptr) +espmxdevkit.menu.exception.legacy.build.exception_flags=-fno-exceptions +espmxdevkit.menu.exception.legacy.build.stdcpp_lib=-lstdc++ +espmxdevkit.menu.exception.disabled=Disabled (new can abort) +espmxdevkit.menu.exception.disabled.build.exception_flags=-fno-exceptions -DNEW_OOM_ABORT +espmxdevkit.menu.exception.disabled.build.stdcpp_lib=-lstdc++ +espmxdevkit.menu.exception.enabled=Enabled +espmxdevkit.menu.exception.enabled.build.exception_flags=-fexceptions +espmxdevkit.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc +espmxdevkit.menu.ssl.all=All SSL ciphers (most compatible) +espmxdevkit.menu.ssl.all.build.sslflags= +espmxdevkit.menu.ssl.basic=Basic SSL ciphers (lower ROM use) +espmxdevkit.menu.ssl.basic.build.sslflags=-DBEARSSL_SSL_BASIC +espmxdevkit.upload.resetmethod=--before default_reset --after hard_reset +espmxdevkit.build.flash_mode=dout +espmxdevkit.build.flash_flags=-DFLASHMODE_DOUT +espmxdevkit.build.flash_freq=40 +espmxdevkit.menu.eesz.1M64=1MB (FS:64KB OTA:~470KB) +espmxdevkit.menu.eesz.1M64.build.flash_size=1M +espmxdevkit.menu.eesz.1M64.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M64.build.flash_ld=eagle.flash.1m64.ld +espmxdevkit.menu.eesz.1M64.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M64.upload.maximum_size=958448 +espmxdevkit.menu.eesz.1M64.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M64.build.spiffs_start=0xEB000 +espmxdevkit.menu.eesz.1M64.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M64.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M128=1MB (FS:128KB OTA:~438KB) +espmxdevkit.menu.eesz.1M128.build.flash_size=1M +espmxdevkit.menu.eesz.1M128.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M128.build.flash_ld=eagle.flash.1m128.ld +espmxdevkit.menu.eesz.1M128.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M128.upload.maximum_size=892912 +espmxdevkit.menu.eesz.1M128.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M128.build.spiffs_start=0xDB000 +espmxdevkit.menu.eesz.1M128.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M128.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M144=1MB (FS:144KB OTA:~430KB) +espmxdevkit.menu.eesz.1M144.build.flash_size=1M +espmxdevkit.menu.eesz.1M144.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M144.build.flash_ld=eagle.flash.1m144.ld +espmxdevkit.menu.eesz.1M144.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M144.upload.maximum_size=876528 +espmxdevkit.menu.eesz.1M144.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M144.build.spiffs_start=0xD7000 +espmxdevkit.menu.eesz.1M144.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M144.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M160=1MB (FS:160KB OTA:~422KB) +espmxdevkit.menu.eesz.1M160.build.flash_size=1M +espmxdevkit.menu.eesz.1M160.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M160.build.flash_ld=eagle.flash.1m160.ld +espmxdevkit.menu.eesz.1M160.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M160.upload.maximum_size=860144 +espmxdevkit.menu.eesz.1M160.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M160.build.spiffs_start=0xD3000 +espmxdevkit.menu.eesz.1M160.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M160.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M192=1MB (FS:192KB OTA:~406KB) +espmxdevkit.menu.eesz.1M192.build.flash_size=1M +espmxdevkit.menu.eesz.1M192.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M192.build.flash_ld=eagle.flash.1m192.ld +espmxdevkit.menu.eesz.1M192.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M192.upload.maximum_size=827376 +espmxdevkit.menu.eesz.1M192.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M192.build.spiffs_start=0xCB000 +espmxdevkit.menu.eesz.1M192.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M192.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M256=1MB (FS:256KB OTA:~374KB) +espmxdevkit.menu.eesz.1M256.build.flash_size=1M +espmxdevkit.menu.eesz.1M256.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M256.build.flash_ld=eagle.flash.1m256.ld +espmxdevkit.menu.eesz.1M256.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M256.upload.maximum_size=761840 +espmxdevkit.menu.eesz.1M256.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M256.build.spiffs_start=0xBB000 +espmxdevkit.menu.eesz.1M256.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M256.build.spiffs_blocksize=4096 +espmxdevkit.menu.eesz.1M512=1MB (FS:512KB OTA:~246KB) +espmxdevkit.menu.eesz.1M512.build.flash_size=1M +espmxdevkit.menu.eesz.1M512.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M512.build.flash_ld=eagle.flash.1m512.ld +espmxdevkit.menu.eesz.1M512.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M512.upload.maximum_size=499696 +espmxdevkit.menu.eesz.1M512.build.rfcal_addr=0xFC000 +espmxdevkit.menu.eesz.1M512.build.spiffs_start=0x7B000 +espmxdevkit.menu.eesz.1M512.build.spiffs_end=0xFB000 +espmxdevkit.menu.eesz.1M512.build.spiffs_blocksize=8192 +espmxdevkit.menu.eesz.1M=1MB (FS:none OTA:~502KB) +espmxdevkit.menu.eesz.1M.build.flash_size=1M +espmxdevkit.menu.eesz.1M.build.flash_size_bytes=0x100000 +espmxdevkit.menu.eesz.1M.build.flash_ld=eagle.flash.1m.ld +espmxdevkit.menu.eesz.1M.build.spiffs_pagesize=256 +espmxdevkit.menu.eesz.1M.upload.maximum_size=1023984 +espmxdevkit.menu.eesz.1M.build.rfcal_addr=0xFC000 +espmxdevkit.menu.ip.lm2f=v2 Lower Memory +espmxdevkit.menu.ip.lm2f.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat +espmxdevkit.menu.ip.lm2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 +espmxdevkit.menu.ip.hb2f=v2 Higher Bandwidth +espmxdevkit.menu.ip.hb2f.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.hb2f.build.lwip_lib=-llwip2-1460-feat +espmxdevkit.menu.ip.hb2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 +espmxdevkit.menu.ip.lm2n=v2 Lower Memory (no features) +espmxdevkit.menu.ip.lm2n.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.lm2n.build.lwip_lib=-llwip2-536 +espmxdevkit.menu.ip.lm2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=0 -DLWIP_IPV6=0 +espmxdevkit.menu.ip.hb2n=v2 Higher Bandwidth (no features) +espmxdevkit.menu.ip.hb2n.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.hb2n.build.lwip_lib=-llwip2-1460 +espmxdevkit.menu.ip.hb2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=0 -DLWIP_IPV6=0 +espmxdevkit.menu.ip.lm6f=v2 IPv6 Lower Memory +espmxdevkit.menu.ip.lm6f.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.lm6f.build.lwip_lib=-llwip6-536-feat +espmxdevkit.menu.ip.lm6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 +espmxdevkit.menu.ip.hb6f=v2 IPv6 Higher Bandwidth +espmxdevkit.menu.ip.hb6f.build.lwip_include=lwip2/include +espmxdevkit.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat +espmxdevkit.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1 +espmxdevkit.menu.ip.hb1=v1.4 Higher Bandwidth +espmxdevkit.menu.ip.hb1.build.lwip_lib=-llwip_gcc +espmxdevkit.menu.ip.hb1.build.lwip_flags=-DLWIP_OPEN_SRC +espmxdevkit.menu.ip.src=v1.4 Compile from source +espmxdevkit.menu.ip.src.build.lwip_lib=-llwip_src +espmxdevkit.menu.ip.src.build.lwip_flags=-DLWIP_OPEN_SRC +espmxdevkit.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" +espmxdevkit.menu.dbg.Disabled=Disabled +espmxdevkit.menu.dbg.Disabled.build.debug_port= +espmxdevkit.menu.dbg.Serial=Serial +espmxdevkit.menu.dbg.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial +espmxdevkit.menu.dbg.Serial1=Serial1 +espmxdevkit.menu.dbg.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 +espmxdevkit.menu.lvl.None____=None +espmxdevkit.menu.lvl.None____.build.debug_level= +espmxdevkit.menu.lvl.SSL=SSL +espmxdevkit.menu.lvl.SSL.build.debug_level= -DDEBUG_ESP_SSL +espmxdevkit.menu.lvl.TLS_MEM=TLS_MEM +espmxdevkit.menu.lvl.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM +espmxdevkit.menu.lvl.HTTP_CLIENT=HTTP_CLIENT +espmxdevkit.menu.lvl.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT +espmxdevkit.menu.lvl.HTTP_SERVER=HTTP_SERVER +espmxdevkit.menu.lvl.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.SSLTLS_MEM=SSL+TLS_MEM +espmxdevkit.menu.lvl.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM +espmxdevkit.menu.lvl.SSLHTTP_CLIENT=SSL+HTTP_CLIENT +espmxdevkit.menu.lvl.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT +espmxdevkit.menu.lvl.SSLHTTP_SERVER=SSL+HTTP_SERVER +espmxdevkit.menu.lvl.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT +espmxdevkit.menu.lvl.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT +espmxdevkit.menu.lvl.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER +espmxdevkit.menu.lvl.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER +espmxdevkit.menu.lvl.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER +espmxdevkit.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER +espmxdevkit.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER +espmxdevkit.menu.lvl.CORE=CORE +espmxdevkit.menu.lvl.CORE.build.debug_level= -DDEBUG_ESP_CORE +espmxdevkit.menu.lvl.WIFI=WIFI +espmxdevkit.menu.lvl.WIFI.build.debug_level= -DDEBUG_ESP_WIFI +espmxdevkit.menu.lvl.HTTP_UPDATE=HTTP_UPDATE +espmxdevkit.menu.lvl.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE +espmxdevkit.menu.lvl.UPDATER=UPDATER +espmxdevkit.menu.lvl.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER +espmxdevkit.menu.lvl.OTA=OTA +espmxdevkit.menu.lvl.OTA.build.debug_level= -DDEBUG_ESP_OTA +espmxdevkit.menu.lvl.OOM=OOM +espmxdevkit.menu.lvl.OOM.build.debug_level= -DDEBUG_ESP_OOM +espmxdevkit.menu.lvl.MDNS=MDNS +espmxdevkit.menu.lvl.MDNS.build.debug_level= -DDEBUG_ESP_MDNS +espmxdevkit.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS +espmxdevkit.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -DDEBUG_ESP_MDNS +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS +espmxdevkit.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -DDEBUG_ESP_MDNS +espmxdevkit.menu.lvl.NoAssert-NDEBUG=NoAssert-NDEBUG +espmxdevkit.menu.lvl.NoAssert-NDEBUG.build.debug_level= -DNDEBUG +espmxdevkit.menu.wipe.none=Only Sketch +espmxdevkit.menu.wipe.none.upload.erase_cmd=flash_id +espmxdevkit.menu.wipe.sdk=Sketch + WiFi Settings +espmxdevkit.menu.wipe.sdk.upload.erase_cmd=erase_region "{build.rfcal_addr}" 0x4000 +espmxdevkit.menu.wipe.all=All Flash Contents +espmxdevkit.menu.wipe.all.upload.erase_cmd=erase_flash +espmxdevkit.menu.baud.115200=115200 +espmxdevkit.menu.baud.115200.upload.speed=115200 +espmxdevkit.menu.baud.57600=57600 +espmxdevkit.menu.baud.57600.upload.speed=57600 +espmxdevkit.menu.baud.230400.linux=230400 +espmxdevkit.menu.baud.230400.macosx=230400 +espmxdevkit.menu.baud.230400.upload.speed=230400 +espmxdevkit.menu.baud.256000.windows=256000 +espmxdevkit.menu.baud.256000.upload.speed=256000 +espmxdevkit.menu.baud.460800.linux=460800 +espmxdevkit.menu.baud.460800.macosx=460800 +espmxdevkit.menu.baud.460800.upload.speed=460800 +espmxdevkit.menu.baud.512000.windows=512000 +espmxdevkit.menu.baud.512000.upload.speed=512000 +espmxdevkit.menu.baud.921600=921600 +espmxdevkit.menu.baud.921600.upload.speed=921600 +espmxdevkit.menu.baud.3000000=3000000 +espmxdevkit.menu.baud.3000000.upload.speed=3000000 + diff --git a/doc/boards.rst b/doc/boards.rst index dab82f3106..538a673f24 100644 --- a/doc/boards.rst +++ b/doc/boards.rst @@ -452,3 +452,23 @@ Initially designed for kids in mind, everybody should be able to use it. Yet it' More details at https://shop.makestro.com/product/espectrocore/ +ITEAD Sonoff +------------ + +ESP8266 based devices from ITEAD: Sonoff SV, Sonoff TH, Sonoff Basic, and Sonoff S20 + +These are not development boards. The development process is inconvenient with these devices. When flashing firmware you will need a Serial Adapter to connect it to your computer. + + | Most of these devices, during normal operation, are connected to *wall power (AKA Mains Electricity)*. **NEVER** try to flash these devices when connected to *wall power*. **ALWAYS** have them disconnected from *wall power* when connecting them to your computer. Your life may depend on it! + +When flashing you will need to hold down the push button connected to the GPIO0 pin, while powering up with a safe 3.3 Volt source. Some USB Serial Adapters may supply enough power to handle flashing; however, it many may not supply enough power to handle the activities when the device reboots. + +More product details at the bottom of https://www.itead.cc/wiki/Product/ + +DOIT ESP-Mx DevKit (ESP8285) +---------------------------- + +DOIT ESP-Mx DevKit - This is a development board by DOIT, with a DOIT ESP-Mx module (`datasheet `__) using a ESP8285 Chip. With the DOIT ESP-Mx module, GPIO pins 9 and 10 are not available. The DOIT ESP-Mx DevKit board has a red power LED and a blue LED connected to GPIO16 and is active low to turn on. It uses a CH340C, USB to Serial converter chip. +ESP8285 (`datasheet `__) is a multi-chip package which contains ESP8266 and 1MB flash. + + diff --git a/doc/faq/a05-board-generator.rst b/doc/faq/a05-board-generator.rst index b57397e271..56adf273a9 100644 --- a/doc/faq/a05-board-generator.rst +++ b/doc/faq/a05-board-generator.rst @@ -54,6 +54,8 @@ As of today you can: * change the default lwIP version (1.4 or 2) +* create an abridged boards.txt file + When do I need to mess with it ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -78,4 +80,61 @@ After a modification in the generator, it is **mandatory** to regenerate all files (option ``--allgen``) and add them in the pull-request. +How to create an abridged boards.txt file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The list of boards presented by the IDE has gotten quite long. You can reduce +the ESP8266 boards shown by the IDE to a favorites list. This can +be done by generating a new boards.txt file using the ``--filter `` +option. + +Start by getting a current list of boards supported by boards.txt.py. +This command will write a list of supported board names to favorites.txt. + +:: + + ./tools/boards.txt.py --boardnames >favorites.txt + +Edit favorites.txt, keeping the name of the boards you want generated in +boards.txt. + +to generate a new abridged boards.txt run: + +:: + + ./tools/boards.txt.py --boardsgen --filter favorites.txt + + +You can turn the process around by creating a list of boards, you do not want +to be generated. To do this we use the ``--xfilter `` option. + +to generate this abridged boards.txt run: + +:: + + ./tools/boards.txt.py --boardsgen --xfilter favorites.txt + + +Yet another option, you can split the boards between boards.txt and +boards.local.txt. + +The commands below will generate a boards.txt file that omits the boards named +in favorites.txt, and generates a boards.local.txt ( via option ``--boardslocalgen`` ) that only contains boards +named in favorites.txt. + +:: + + ./tools/boards.txt.py --boardsgen --xfilter favorites.txt + ./tools/boards.txt.py --boardslocalgen --filter favorites.txt + +Additional Notes: + +1. The boards.txt file will always contain the generic and esp8285 boards. + +2. If boards.txt file exist and no backup copy named boards.txt.orig exist, the current boards.txt will be renamed to boards.txt.orig. Otherwise, the existing boards.txt is over-writen when you generate a new boards.txt file. Similar behavior for when generating a new boards.local.txt. + +3. The boards in the boards.txt file will be in the order they were listed in your favorites file, specified by option ``--filter ``. + +4. It is outside the scope of this document, but you could manually edit any boards.txt file to have fewer boards. One last observation, the Arduino IDE appears to need at least one board in a board.txt file. + `FAQ list :back: `__ diff --git a/tools/boards.txt.py b/tools/boards.txt.py index 36cf2f01f3..53964bbc04 100755 --- a/tools/boards.txt.py +++ b/tools/boards.txt.py @@ -40,6 +40,8 @@ import re import json +requiredboards = [ 'generic', 'esp8285' ] + # serial upload speed order in menu # default is 115 for every board unless specified with 'serial' in board # or by user command line @@ -363,7 +365,7 @@ '', 'Product page: https://xinabox.cc/products/CW01' ], - }), + }), ( 'espresso_lite_v1', { 'name': 'ESPresso Lite 1.0', 'opts': { @@ -603,7 +605,7 @@ '1M', ], 'serial': '921', - 'desc': [ + 'desc': [ 'Parameters in Arduino IDE:', '~~~~~~~~~~~~~~~~~~~~~~~~~~', '', @@ -857,6 +859,76 @@ '', 'More details at https://shop.makestro.com/product/espectrocore/', ], + }), + ( 'sonoff', { + 'name': 'ITEAD Sonoff', + 'opts': { + '.build.board': 'SONOFF_SV', + '.build.variant': 'itead', + '.build.extra_flags': '-DESP8266', + '.build.flash_size': '1M', + '.menu.BoardModel.sonoffSV': 'ITEAD Sonoff SV', + '.menu.BoardModel.sonoffSV.build.board': 'SONOFF_SV', + '.menu.BoardModel.sonoffTH': 'ITEAD Sonoff TH', + '.menu.BoardModel.sonoffTH.build.board': 'SONOFF_TH', + '.menu.BoardModel.sonoffBasic': 'ITEAD Sonoff Basic', + '.menu.BoardModel.sonoffBasic.build.board': 'SONOFF_BASIC', + '.menu.BoardModel.sonoffS20': 'ITEAD Sonoff S20', + '.menu.BoardModel.sonoffS20.build.board': 'SONOFF_S20', + }, + 'macro': [ + 'resetmethod_none', + 'flashmode_dout', + 'flashfreq_40', + '1M', + ], + 'desc': [ + 'ESP8266 based devices from ITEAD: Sonoff SV, Sonoff TH, Sonoff Basic, ' + 'and Sonoff S20', + '', + 'These are not development boards. The development process is ' + 'inconvenient with these devices. When flashing firmware you will ' + 'need a Serial Adapter to connect it to your computer.', + '', + ' | Most of these devices, during normal operation, are connected to ' + '*wall power (AKA Mains Electricity)*. **NEVER** try to flash these ' + 'devices when connected to *wall power*. **ALWAYS** have them ' + 'disconnected from *wall power* when connecting them to your ' + 'computer. Your life may depend on it!', + '', + 'When flashing you will need to hold down the push button connected ' + 'to the GPIO0 pin, while powering up with a safe 3.3 Volt source. Some USB ' + 'Serial Adapters may supply enough power to handle flashing; ' + 'however, it many may not supply enough power to handle the ' + 'activities when the device reboots.', + '', + 'More product details at the bottom of https://www.itead.cc/wiki/Product/' + ], + }), + ( 'espmxdevkit', { + 'name': 'DOIT ESP-Mx DevKit (ESP8285)', + 'opts': { + '.build.board': 'ESP8266_ESP01', + '.build.variant': 'esp8285', + '.build.led': '-DLED_BUILTIN=16', + }, + 'macro': [ + 'resetmethod_nodemcu', + 'flashmode_dout', + 'flashfreq_40', + '1M', + ], + 'desc': [ + 'DOIT ESP-Mx DevKit - This is a development board by DOIT, with a DOIT ESP-Mx module ' + '(`datasheet `__) ' + 'using a ESP8285 Chip. With the DOIT ESP-Mx module, GPIO pins 9 and 10 are not available. ' + 'The DOIT ESP-Mx DevKit board has a red power LED and a blue LED connected to GPIO16 ' + 'and is active low to turn on. It uses a CH340C, USB to Serial converter chip. ' + '', + 'ESP8285 (`datasheet `__) ' + 'is a multi-chip package which contains ESP8266 and 1MB flash. ', + '', + ], }) ]) @@ -956,7 +1028,7 @@ 'resetmethod_nodemcu': collections.OrderedDict([ ( '.upload.resetmethod', '--before default_reset --after hard_reset' ), ]), - + 'resetmethod_none': collections.OrderedDict([ ( '.upload.resetmethod', '--before no_reset --after soft_reset' ), ]), @@ -1401,29 +1473,58 @@ def sdk (): def all_boards (): - if boardsgen: + if boardsgen or boardslocalgen: checkdir() - # check if backup already exists - if not os.path.isfile("boards.txt.orig"): - os.rename("boards.txt", "boards.txt.orig") + if boardsgen: + # check if backup already exists + if not os.path.isfile("boards.txt.orig"): + os.rename("boards.txt", "boards.txt.orig") - realstdout = sys.stdout - sys.stdout = open("boards.txt", 'w') + realstdout = sys.stdout + sys.stdout = open("boards.txt", 'w') + else: + # make backup of boards.local.txt + if os.path.isfile("boards.local.txt"): + if not os.path.isfile("boards.local.txt.orig"): + os.rename("boards.local.txt", "boards.local.txt.orig") + + realstdout = sys.stdout + sys.stdout = open("boards.local.txt", 'w') macros.update(all_flash_map()) macros.update(all_debug()) macros.update(led(led_default, led_max)) macros.update(sdk()) + if boardfilteropt or excludeboards: + print('#') + print('# Do not create pull-requests with this abridged file!') + print('# Do as instructed further down.') + print('#') + + out = "" + for a in sys.argv: + out += " " + a + print('# Abridged boards.txt or boards.local.txt created by:' + out) + out = "" + for a in boardlist: + out += " " + a + print('# The following boards were included: ' + out) + print('#') + + print('#') print('# Do not create pull-requests for this file only, CI will not accept them.') print('# You *must* edit/modify/run ' + os.path.basename(sys.argv[0]) + ' to regenerate boards.txt.') print('# All modified files after running with option "--allgen" must be included in the pull-request.') print('#') print('') + # With Arduino IDE 1.8.7 the order of the menu items will be honored from the tools pull down list. print('menu.BoardModel=Model') + print('menu.ESPModule=Module') + print('menu.led=Builtin Led') print('menu.baud=Upload Speed') print('menu.xtal=CPU Frequency') print('menu.CrystalFreq=Crystal Frequency') @@ -1431,19 +1532,22 @@ def all_boards (): print('menu.FlashMode=Flash Mode') print('menu.FlashFreq=Flash Frequency') print('menu.ResetMethod=Reset Method') - print('menu.ESPModule=Module') print('menu.dbg=Debug port') print('menu.lvl=Debug Level') print('menu.ip=lwIP Variant') print('menu.vt=VTables') print('menu.exception=Exceptions') - print('menu.led=Builtin Led') print('menu.wipe=Erase Flash') print('menu.sdk=Espressif FW') print('menu.ssl=SSL Support') print('') - for id in boards: + missingboards = [] + for id in boardlist: + if id not in boards: + missingboards += [ id ]; + continue + print('##############################################################') board = boards[id] print(id + '.name=' + board['name']) @@ -1481,10 +1585,19 @@ def all_boards (): print('') - if boardsgen: + if boardsgen or boardslocalgen: sys.stdout.close() sys.stdout = realstdout + + if missingboards: + print("No board definitions were found for the following boards:") + print(missingboards) + print("") + + if boardsgen: print("generated: boards.txt") + else: + print("generated: boards.local.txt") ################################################################ @@ -1508,7 +1621,7 @@ def package (): substitution = '"boards": [\n' board_items = [' {\n "name": "%s"\n }' % boards[id]['name'] for id in boards] - substitution += ',\n'.join(board_items) + substitution += ',\n'.join(board_items) substitution += '\n ],' newfilestr = re.sub(r'"boards":[^\]]*\],', substitution, filestr, re.MULTILINE) @@ -1562,6 +1675,16 @@ def doc (): sys.stdout = realstdout print("generated: doc/boards.rst") +################################################################ + +def boardnames (): + print('# Available board names. Delete or comment out the boards you do not need:') + + for id in boards: + print('{: <20s} # {}'.format(id, boards[id]['name'])) + + sys.exit(0) + ################################################################ # help / usage @@ -1575,22 +1698,27 @@ def usage (name,ret): print(" --lwip - preferred default lwIP version (default %d)" % lwip) print(" --led - preferred default builtin led for generic boards (default %d)" % led_default) print(" --board - board to modify:") + print(" --filter - create a short boards.txt based on the boards listed in ") + print(" --xfilter - create a short boards.txt excluding the boards listed in ") + print(" (For --filter or --xfilter use only one)") print(" --speed - change default serial speed") print(" --customspeed - new serial speed for all boards") print(" --nofloat - disable float support in printf/scanf") print("") print(" mandatory option (at least one):") print("") - print(" --boards - show boards.txt") - print(" --boardsgen - replace boards.txt") - print(" --ld - show ldscripts") - print(" --ldgen - replace ldscripts") - print(" --package - show package") - print(" --packagegen - replace board:[] in package") - print(" --doc - shows doc/boards.rst") - print(" --docgen - replace doc/boards.rst") - print(" --allgen - generate and replace everything") - print(" (useful for pushing on github)") + print(" --boards - show boards.txt") + print(" --boardsgen - replace boards.txt") + print(" --boardslocalgen - replace boards.local.txt instead of boards.txt") + print(" --boardnames - prints a list of board names, one per line") + print(" --ld - show ldscripts") + print(" --ldgen - replace ldscripts") + print(" --package - show package") + print(" --packagegen - replace board:[] in package") + print(" --doc - shows doc/boards.rst") + print(" --docgen - replace doc/boards.rst") + print(" --allgen - generate and replace everything") + print(" (useful for pushing on github)") print("") out = "" @@ -1625,6 +1753,14 @@ def usage (name,ret): ldshow = False boardsgen = False boardsshow = False + +boardlist = [] +boardfilterfile = "" +boardfilteropt = False +excludeboardlist = [] +excludeboards = False +boardslocalgen = False + packageshow = False packagegen = False docshow = False @@ -1638,6 +1774,7 @@ def usage (name,ret): opts, args = getopt.getopt(sys.argv[1:], "h", [ "help", "lwip=", "led=", "speed=", "board=", "customspeed=", "nofloat", "noextra4kheap", "allowWPS", + "boardslocalgen", "filter=", "xfilter=", "boardnames", "ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen", "allgen"] ) except getopt.GetoptError as err: @@ -1652,6 +1789,9 @@ def usage (name,ret): if o in ("-h", "--help"): usage(sys.argv[0], 0) + elif o in ("--boardnames"): + boardnames() + elif o in ("--lwip"): lwip = a @@ -1669,6 +1809,14 @@ def usage (name,ret): usage(sys.argv[0], 1) board = a + elif o in ("--filter"): + boardfilteropt = True + boardfilterfile = a + + elif o in ("--xfilter"): + excludeboards = True + boardfilterfile = a + elif o in ("--speed"): if board == no: print("board not set") @@ -1698,6 +1846,10 @@ def usage (name,ret): boardsshow = True boardsgen = True + elif o in ("--boardslocalgen"): + boardsshow = True + boardslocalgen = True + elif o in ("--package"): packageshow = True @@ -1727,6 +1879,45 @@ def usage (name,ret): #### ^^^^ cmdline parsing ends +#### vvvv Filter file processing if we have one + +if boardfilteropt and excludeboards: + print('Specify either --filter or --xfilter, not both.') + usage(sys.argv[0], 1) + +if boardfilteropt or excludeboards: + if not os.path.isfile(boardfilterfile): + print('Filter file missing: ', boardfilterfile) + usage(sys.argv[0], 1) + + f = open(boardfilterfile, 'r') + for line in f: + a = line.split('#', 1)[0].strip() + if a != '': + boardlist += [ a ] + f.close() + + if not boardslocalgen: + if boardfilteropt: + for name in requiredboards: + if name not in boardlist: + boardlist.append(name) + else: + # excludeboards: + for name in requiredboards: + if name in boardlist: + boardlist.remove(name) + + if boardfilteropt: + print('Applying keep filter list:') + else: + print('Applying exclude filter list:') + + print(boardlist) + print('') + +#### ^^^^ Filter file processing finished + did = False if ldshow: @@ -1736,6 +1927,13 @@ def usage (name,ret): if boardsshow: ldshow = False ldgen = False + if not boardfilteropt: + if excludeboards: + excludeboardlist = boardlist + boardlist = [] + for b in boards: + if b not in excludeboardlist: + boardlist += [ b ] all_boards() did = True diff --git a/variants/itead/pins_arduino.h b/variants/itead/pins_arduino.h new file mode 100644 index 0000000000..ad54a0b815 --- /dev/null +++ b/variants/itead/pins_arduino.h @@ -0,0 +1,53 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#if defined(ARDUINO_SONOFF_SV) +#define PIN_WIRE_SCL (5) +static const uint8_t SCL = PIN_WIRE_SCL; +#endif + +#if defined(ARDUINO_SONOFF_TH) || defined(ARDUINO_SONOFF_BASIC) +#define PIN_WIRE_SCL (14) +static const uint8_t SCL = PIN_WIRE_SCL; +#endif + +#if defined(ARDUINO_SONOFF_TH) || defined(ARDUINO_SONOFF_SV) +#define PIN_WIRE_SDA (4) +static const uint8_t SDA = PIN_WIRE_SDA; +#endif + +static const uint8_t BUILTIN_BUTTON = 0; +static const uint8_t BUILTIN_RELAY = 12; + +#define BUTTON_BUILTIN (0) +#define LED_BUILTIN (13) +#define RELAY_BUILTIN (12) + +#include "../generic/common.h" + +#endif /* Pins_Arduino_h */