Skip to content

Commit

Permalink
Merge branch 'master' into pr-heap-refactor3
Browse files Browse the repository at this point in the history
  • Loading branch information
mhightower83 authored Aug 30, 2024
2 parents 1c99daf + ccea728 commit 2bbadca
Show file tree
Hide file tree
Showing 107 changed files with 2,524 additions and 831 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,9 @@ jobs:
with:
python-version: '3.x'
- name: Style check
env:
LLVM_SNAPSHOT_KEY: "6084F3CF814B57C1CF12EFD515CF4D18AF4F7421"
run: |
export GNUPGHOME=$(mktemp -d)
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$LLVM_SNAPSHOT_KEY"
gpg --batch --armor --export "$LLVM_SNAPSHOT_KEY" | \
sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.gpg.asc
gpgconf --kill all
rm -r $GNUPGHOME
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main" | \
sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt update
sudo apt install clang-format-13
pip3 install pyyaml
python ./tests/test_restyle.py --quiet
bash ./tests/ci/style_check.sh
# Validate orthography
Expand Down
223 changes: 223 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5645,6 +5645,229 @@ agruminolemon.menu.iramfloat.no.build.iramfloat=-DFP_IN_IROM
agruminolemon.menu.iramfloat.yes=allowed in ISR
agruminolemon.menu.iramfloat.yes.build.iramfloat=-DFP_IN_IRAM

##############################################################
mercury1.name=Mercury 1.0
mercury1.build.board=mercury
mercury1.build.variant=mercury_v1
mercury1.upload.tool=esptool
mercury1.upload.maximum_data_size=81920
mercury1.upload.wait_for_upload_port=true
mercury1.upload.erase_cmd=
mercury1.serial.disableDTR=true
mercury1.serial.disableRTS=true
mercury1.build.mcu=esp8266
mercury1.build.core=esp8266
mercury1.build.spiffs_pagesize=256
mercury1.build.debug_optim=
mercury1.build.debug_port=
mercury1.build.debug_level=
mercury1.menu.xtal.80=80 MHz
mercury1.menu.xtal.80.build.f_cpu=80000000L
mercury1.menu.xtal.160=160 MHz
mercury1.menu.xtal.160.build.f_cpu=160000000L
mercury1.menu.vt.flash=Flash
mercury1.menu.vt.flash.build.vtable_flags=-DVTABLES_IN_FLASH
mercury1.menu.vt.heap=Heap
mercury1.menu.vt.heap.build.vtable_flags=-DVTABLES_IN_DRAM
mercury1.menu.vt.iram=IRAM
mercury1.menu.vt.iram.build.vtable_flags=-DVTABLES_IN_IRAM
mercury1.menu.exception.disabled=Disabled (new aborts on oom)
mercury1.menu.exception.disabled.build.exception_flags=-fno-exceptions
mercury1.menu.exception.disabled.build.stdcpp_lib=-lstdc++
mercury1.menu.exception.enabled=Enabled
mercury1.menu.exception.enabled.build.exception_flags=-fexceptions
mercury1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
mercury1.menu.stacksmash.disabled=Disabled
mercury1.menu.stacksmash.disabled.build.stacksmash_flags=
mercury1.menu.stacksmash.enabled=Enabled
mercury1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
mercury1.menu.ssl.all=All SSL ciphers (most compatible)
mercury1.menu.ssl.all.build.sslflags=
mercury1.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
mercury1.menu.ssl.basic.build.sslflags=-DBEARSSL_SSL_BASIC
mercury1.menu.mmu.3232=32KB cache + 32KB IRAM (balanced)
mercury1.menu.mmu.3232.build.mmuflags=-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000
mercury1.menu.mmu.4816=16KB cache + 48KB IRAM (IRAM)
mercury1.menu.mmu.4816.build.mmuflags=-DMMU_IRAM_SIZE=0xC000 -DMMU_ICACHE_SIZE=0x4000
mercury1.menu.mmu.4816H=16KB cache + 48KB IRAM and 2nd Heap (shared)
mercury1.menu.mmu.4816H.build.mmuflags=-DMMU_IRAM_SIZE=0xC000 -DMMU_ICACHE_SIZE=0x4000 -DMMU_IRAM_HEAP
mercury1.menu.mmu.3216=16KB cache + 32KB IRAM + 16KB 2nd Heap (not shared)
mercury1.menu.mmu.3216.build.mmuflags=-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x4000 -DMMU_SEC_HEAP=0x40108000 -DMMU_SEC_HEAP_SIZE=0x4000
mercury1.menu.mmu.ext128k=128K Heap External 23LC1024
mercury1.menu.mmu.ext128k.build.mmuflags=-DMMU_EXTERNAL_HEAP=128 -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000
mercury1.menu.mmu.ext8192k=8M w/256K Heap External 64 MBit PSRAM
mercury1.menu.mmu.ext8192k.build.mmuflags=-DMMU_EXTERNAL_HEAP=256 -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000
mercury1.menu.non32xfer.fast=Use pgm_read macros for IRAM/PROGMEM
mercury1.menu.non32xfer.fast.build.non32xferflags=
mercury1.menu.non32xfer.safe=Byte/Word access to IRAM/PROGMEM (very slow)
mercury1.menu.non32xfer.safe.build.non32xferflags=-DNON32XFER_HANDLER
mercury1.upload.resetmethod=--before default_reset --after hard_reset
mercury1.build.flash_mode=dio
mercury1.build.flash_flags=-DFLASHMODE_DIO
mercury1.build.flash_freq=40
mercury1.menu.eesz.4M2M=4MB (FS:2MB OTA:~1019KB)
mercury1.menu.eesz.4M2M.build.flash_size=4M
mercury1.menu.eesz.4M2M.build.flash_ld=eagle.flash.4m2m.ld
mercury1.menu.eesz.4M2M.build.spiffs_pagesize=256
mercury1.menu.eesz.4M2M.build.rfcal_addr=0x3FC000
mercury1.menu.eesz.4M2M.build.spiffs_start=0x200000
mercury1.menu.eesz.4M2M.build.spiffs_end=0x3FA000
mercury1.menu.eesz.4M2M.build.spiffs_blocksize=8192
mercury1.menu.eesz.4M3M=4MB (FS:3MB OTA:~512KB)
mercury1.menu.eesz.4M3M.build.flash_size=4M
mercury1.menu.eesz.4M3M.build.flash_ld=eagle.flash.4m3m.ld
mercury1.menu.eesz.4M3M.build.spiffs_pagesize=256
mercury1.menu.eesz.4M3M.build.rfcal_addr=0x3FC000
mercury1.menu.eesz.4M3M.build.spiffs_start=0x100000
mercury1.menu.eesz.4M3M.build.spiffs_end=0x3FA000
mercury1.menu.eesz.4M3M.build.spiffs_blocksize=8192
mercury1.menu.eesz.4M1M=4MB (FS:1MB OTA:~1019KB)
mercury1.menu.eesz.4M1M.build.flash_size=4M
mercury1.menu.eesz.4M1M.build.flash_ld=eagle.flash.4m1m.ld
mercury1.menu.eesz.4M1M.build.spiffs_pagesize=256
mercury1.menu.eesz.4M1M.build.rfcal_addr=0x3FC000
mercury1.menu.eesz.4M1M.build.spiffs_start=0x300000
mercury1.menu.eesz.4M1M.build.spiffs_end=0x3FA000
mercury1.menu.eesz.4M1M.build.spiffs_blocksize=8192
mercury1.menu.eesz.4M=4MB (FS:none OTA:~1019KB)
mercury1.menu.eesz.4M.build.flash_size=4M
mercury1.menu.eesz.4M.build.flash_ld=eagle.flash.4m.ld
mercury1.menu.eesz.4M.build.spiffs_pagesize=256
mercury1.menu.eesz.4M.build.rfcal_addr=0x3FC000
mercury1.menu.ip.lm2f=v2 Lower Memory
mercury1.menu.ip.lm2f.build.lwip_include=lwip2/include
mercury1.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat
mercury1.menu.ip.lm2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0
mercury1.menu.ip.hb2f=v2 Higher Bandwidth
mercury1.menu.ip.hb2f.build.lwip_include=lwip2/include
mercury1.menu.ip.hb2f.build.lwip_lib=-llwip2-1460-feat
mercury1.menu.ip.hb2f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=0
mercury1.menu.ip.lm2n=v2 Lower Memory (no features)
mercury1.menu.ip.lm2n.build.lwip_include=lwip2/include
mercury1.menu.ip.lm2n.build.lwip_lib=-llwip2-536
mercury1.menu.ip.lm2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=0 -DLWIP_IPV6=0
mercury1.menu.ip.hb2n=v2 Higher Bandwidth (no features)
mercury1.menu.ip.hb2n.build.lwip_include=lwip2/include
mercury1.menu.ip.hb2n.build.lwip_lib=-llwip2-1460
mercury1.menu.ip.hb2n.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=0 -DLWIP_IPV6=0
mercury1.menu.ip.lm6f=v2 IPv6 Lower Memory
mercury1.menu.ip.lm6f.build.lwip_include=lwip2/include
mercury1.menu.ip.lm6f.build.lwip_lib=-llwip6-536-feat
mercury1.menu.ip.lm6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=1
mercury1.menu.ip.hb6f=v2 IPv6 Higher Bandwidth
mercury1.menu.ip.hb6f.build.lwip_include=lwip2/include
mercury1.menu.ip.hb6f.build.lwip_lib=-llwip6-1460-feat
mercury1.menu.ip.hb6f.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -DLWIP_FEATURES=1 -DLWIP_IPV6=1
mercury1.menu.dbg.Disabled=Disabled
mercury1.menu.dbg.Disabled.build.debug_port=
mercury1.menu.dbg.Serial=Serial
mercury1.menu.dbg.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial
mercury1.menu.dbg.Serial1=Serial1
mercury1.menu.dbg.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1
mercury1.menu.lvl.None____=None
mercury1.menu.lvl.None____.build.debug_level=
mercury1.menu.optim.Smallest=None
mercury1.menu.optim.Smallest.build.debug_optim=-Os
mercury1.menu.optim.Lite=Lite
mercury1.menu.optim.Lite.build.debug_optim=-Os -fno-optimize-sibling-calls
mercury1.menu.optim.Full=Optimum
mercury1.menu.optim.Full.build.debug_optim=-Og
mercury1.menu.lvl.SSL=SSL
mercury1.menu.lvl.SSL.build.debug_level= -DDEBUG_ESP_SSL
mercury1.menu.lvl.TLS_MEM=TLS_MEM
mercury1.menu.lvl.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM
mercury1.menu.lvl.HTTP_CLIENT=HTTP_CLIENT
mercury1.menu.lvl.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT
mercury1.menu.lvl.HTTP_SERVER=HTTP_SERVER
mercury1.menu.lvl.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.SSLTLS_MEM=SSL+TLS_MEM
mercury1.menu.lvl.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM
mercury1.menu.lvl.SSLHTTP_CLIENT=SSL+HTTP_CLIENT
mercury1.menu.lvl.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT
mercury1.menu.lvl.SSLHTTP_SERVER=SSL+HTTP_SERVER
mercury1.menu.lvl.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT
mercury1.menu.lvl.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT
mercury1.menu.lvl.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER
mercury1.menu.lvl.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER
mercury1.menu.lvl.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT
mercury1.menu.lvl.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER
mercury1.menu.lvl.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER
mercury1.menu.lvl.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER
mercury1.menu.lvl.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER
mercury1.menu.lvl.CORE=CORE
mercury1.menu.lvl.CORE.build.debug_level= -DDEBUG_ESP_CORE
mercury1.menu.lvl.WIFI=WIFI
mercury1.menu.lvl.WIFI.build.debug_level= -DDEBUG_ESP_WIFI
mercury1.menu.lvl.HTTP_UPDATE=HTTP_UPDATE
mercury1.menu.lvl.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE
mercury1.menu.lvl.UPDATER=UPDATER
mercury1.menu.lvl.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER
mercury1.menu.lvl.OTA=OTA
mercury1.menu.lvl.OTA.build.debug_level= -DDEBUG_ESP_OTA
mercury1.menu.lvl.OOM=OOM
mercury1.menu.lvl.OOM.build.debug_level= -DDEBUG_ESP_OOM
mercury1.menu.lvl.MDNS=MDNS
mercury1.menu.lvl.MDNS.build.debug_level= -DDEBUG_ESP_MDNS
mercury1.menu.lvl.HWDT=HWDT
mercury1.menu.lvl.HWDT.build.debug_level= -DDEBUG_ESP_HWDT
mercury1.menu.lvl.HWDT_NOEXTRA4K=HWDT_NOEXTRA4K
mercury1.menu.lvl.HWDT_NOEXTRA4K.build.debug_level= -DDEBUG_ESP_HWDT_NOEXTRA4K
mercury1.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS
mercury1.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
mercury1.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS+HWDT
mercury1.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT.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 -DDEBUG_ESP_HWDT
mercury1.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT_NOEXTRA4K=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS+HWDT_NOEXTRA4K
mercury1.menu.lvl.COREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT_NOEXTRA4K.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 -DDEBUG_ESP_HWDT_NOEXTRA4K
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNS=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS
mercury1.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
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS+HWDT
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT.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 -DDEBUG_ESP_HWDT
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT_NOEXTRA4K=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM+MDNS+HWDT_NOEXTRA4K
mercury1.menu.lvl.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOMMDNSHWDT_NOEXTRA4K.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 -DDEBUG_ESP_HWDT_NOEXTRA4K
mercury1.menu.lvl.NoAssert-NDEBUG=NoAssert-NDEBUG
mercury1.menu.lvl.NoAssert-NDEBUG.build.debug_level= -DNDEBUG
mercury1.menu.wipe.none=Only Sketch
mercury1.menu.wipe.none.upload.erase_cmd=
mercury1.menu.wipe.sdk=Sketch + WiFi Settings
mercury1.menu.wipe.sdk.upload.erase_cmd=erase_region "{build.rfcal_addr}" 0x4000
mercury1.menu.wipe.all=All Flash Contents
mercury1.menu.wipe.all.upload.erase_cmd=erase_flash
mercury1.menu.baud.115200=115200
mercury1.menu.baud.115200.upload.speed=115200
mercury1.menu.baud.57600=57600
mercury1.menu.baud.57600.upload.speed=57600
mercury1.menu.baud.230400.linux=230400
mercury1.menu.baud.230400.macosx=230400
mercury1.menu.baud.230400.upload.speed=230400
mercury1.menu.baud.256000.windows=256000
mercury1.menu.baud.256000.upload.speed=256000
mercury1.menu.baud.460800.linux=460800
mercury1.menu.baud.460800.macosx=460800
mercury1.menu.baud.460800.upload.speed=460800
mercury1.menu.baud.512000.windows=512000
mercury1.menu.baud.512000.upload.speed=512000
mercury1.menu.baud.921600=921600
mercury1.menu.baud.921600.upload.speed=921600
mercury1.menu.baud.3000000=3000000
mercury1.menu.baud.3000000.upload.speed=3000000
mercury1.menu.eesz.autoflash=Mapping defined by Hardware and Sketch
mercury1.menu.eesz.autoflash.build.flash_size=16M
mercury1.menu.eesz.autoflash.build.flash_ld=eagle.flash.auto.ld
mercury1.menu.eesz.autoflash.build.extra_flags=-DFLASH_MAP_SUPPORT=1
mercury1.menu.eesz.autoflash.upload.maximum_size=1044464
mercury1.menu.iramfloat.no=in IROM
mercury1.menu.iramfloat.no.build.iramfloat=-DFP_IN_IROM
mercury1.menu.iramfloat.yes=allowed in ISR
mercury1.menu.iramfloat.yes.build.iramfloat=-DFP_IN_IRAM

##############################################################
nodemcu.name=NodeMCU 0.9 (ESP-12 Module)
nodemcu.build.board=ESP8266_NODEMCU_ESP12
Expand Down
2 changes: 1 addition & 1 deletion cores/esp8266/LwipIntf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C"
// can return nullptr when STA is down
// - Because WiFi is started in off mode at boot time,
// wifi_station_set/get_hostname() is now no more used
// because setting hostname firt does not work anymore
// because setting hostname first does not work anymore
// - wifi_station_hostname is overwritten by SDK when wifi is
// woken up in WiFi::mode()
//
Expand Down
27 changes: 9 additions & 18 deletions cores/esp8266/LwipIntfDev.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,11 @@ class LwipIntfDev: public LwipIntf, public RawDev
return &_netif;
}

uint8_t* macAddress(uint8_t* mac) // WiFi lib way
uint8_t* macAddress(uint8_t* mac)
{
memcpy(mac, &_netif.hwaddr, 6);
return mac;
}
void MACAddress(uint8_t* mac) // Ethernet lib way
{
macAddress(mac);
}
IPAddress localIP() const
{
return IPAddress(ip4_addr_get_u32(ip_2_ip4(&_netif.ip_addr)));
Expand All @@ -104,15 +100,11 @@ class LwipIntfDev: public LwipIntf, public RawDev
{
return IPAddress(ip4_addr_get_u32(ip_2_ip4(&_netif.gw)));
}
IPAddress dnsIP(int n = 0) const // WiFi lib way
IPAddress dnsIP(int n = 0) const
{
return IPAddress(dns_getserver(n));
}
IPAddress dnsServerIP() const // Ethernet lib way
{
return dnsIP(0);
}
void setDNS(IPAddress dns1, IPAddress dns2 = INADDR_ANY) // WiFi lib way
void setDNS(IPAddress dns1, IPAddress dns2 = INADDR_ANY)
{
if (dns1.isSet())
{
Expand All @@ -123,10 +115,6 @@ class LwipIntfDev: public LwipIntf, public RawDev
dns_setserver(1, dns2);
}
}
void setDnsServerIP(const IPAddress dnsIP) // Ethernet lib way
{
setDNS(dnsIP);
}

// 1. Currently when no default is set, esp8266-Arduino uses the first
// DHCP client interface receiving a valid address and gateway to
Expand Down Expand Up @@ -361,9 +349,12 @@ boolean LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu
template<class RawDev>
void LwipIntfDev<RawDev>::end()
{
netif_remove(&_netif);
_started = false;
RawDev::end();
if (_started)
{
netif_remove(&_netif);
_started = false;
RawDev::end();
}
}

template<class RawDev>
Expand Down
4 changes: 4 additions & 0 deletions cores/esp8266/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,21 +196,25 @@ class Stream: public Print {
// returns number of transferred bytes
size_t sendAvailable (Stream* to) { return sendGeneric(to, -1, -1, oneShotMs::alwaysExpired); }
size_t sendAvailable (Stream& to) { return sendAvailable(&to); }
size_t sendAvailable (Stream&& to) { return sendAvailable(&to); }

// transfers data until timeout
// returns number of transferred bytes
size_t sendAll (Stream* to, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, -1, -1, timeoutMs); }
size_t sendAll (Stream& to, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendAll(&to, timeoutMs); }
size_t sendAll (Stream&& to, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendAll(&to, timeoutMs); }

// transfers data until a char is encountered (the char is swallowed but not transferred) with timeout
// returns number of transferred bytes
size_t sendUntil (Stream* to, const int readUntilChar, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, -1, readUntilChar, timeoutMs); }
size_t sendUntil (Stream& to, const int readUntilChar, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendUntil(&to, readUntilChar, timeoutMs); }
size_t sendUntil (Stream&& to, const int readUntilChar, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendUntil(&to, readUntilChar, timeoutMs); }

// transfers data until requested size or timeout
// returns number of transferred bytes
size_t sendSize (Stream* to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, maxLen, -1, timeoutMs); }
size_t sendSize (Stream& to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendSize(&to, maxLen, timeoutMs); }
size_t sendSize (Stream&& to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendSize(&to, maxLen, timeoutMs); }

// remaining size (-1 by default = unknown)
virtual ssize_t streamRemaining () { return -1; }
Expand Down
Loading

0 comments on commit 2bbadca

Please sign in to comment.