From b446396463d4ea3d2a58e53066e1238bbb49f7a1 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Tue, 1 Feb 2022 15:08:46 -0500 Subject: [PATCH 01/13] Reworked the state machine to remove some annoyance output. --- ESPixelStick/src/network/EthernetDriver.cpp | 77 +++++++++------------ ESPixelStick/src/network/EthernetDriver.hpp | 26 +++---- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/ESPixelStick/src/network/EthernetDriver.cpp b/ESPixelStick/src/network/EthernetDriver.cpp index e276b4555..cd4cf8c95 100644 --- a/ESPixelStick/src/network/EthernetDriver.cpp +++ b/ESPixelStick/src/network/EthernetDriver.cpp @@ -31,8 +31,8 @@ static fsm_Eth_state_Boot fsm_Eth_state_Boot_imp; static fsm_Eth_state_PoweringUp fsm_Eth_state_PoweringUp_imp; static fsm_Eth_state_ConnectingToEth fsm_Eth_state_ConnectingToEth_imp; -static fsm_Eth_state_ConnectedToEth fsm_Eth_state_ConnectedToEth_imp; -static fsm_Eth_state_ConnectionFailed fsm_Eth_state_ConnectionFailed_imp; +static fsm_Eth_state_WaitForIP fsm_Eth_state_WaitForIP_imp; +static fsm_Eth_state_GotIp fsm_Eth_state_GotIp_imp; static fsm_Eth_state_DeviceInitFailed fsm_Eth_state_DeviceInitFailed_imp; //----------------------------------------------------------------------------- @@ -44,8 +44,8 @@ c_EthernetDriver::c_EthernetDriver () fsm_Eth_state_Boot_imp.SetParent (this); fsm_Eth_state_PoweringUp_imp.SetParent (this); fsm_Eth_state_ConnectingToEth_imp.SetParent (this); - fsm_Eth_state_ConnectedToEth_imp.SetParent (this); - fsm_Eth_state_ConnectionFailed_imp.SetParent (this); + fsm_Eth_state_WaitForIP_imp.SetParent (this); + fsm_Eth_state_GotIp_imp.SetParent (this); fsm_Eth_state_DeviceInitFailed_imp.SetParent (this); // this gets called pre-setup so there is nothing we can do here. @@ -204,7 +204,7 @@ bool c_EthernetDriver::IsConnected () { // DEBUG_V(""); - return (pCurrentFsmState == &fsm_Eth_state_ConnectedToEth_imp); + return (pCurrentFsmState == &fsm_Eth_state_WaitForIP_imp); } // IsConnected @@ -511,31 +511,13 @@ void fsm_Eth_state_ConnectingToEth::Init () } // fsm_Eth_state_ConnectingToEthUsingConfig::Init -/*****************************************************************************/ -void fsm_Eth_state_ConnectingToEth::Poll () -{ - // DEBUG_START; - - // wait for the connection to complete via the callback function - // uint32_t CurrentTimeMS = millis (); - - // @TODO Ethernet connection timeout is currently hardcoded. Add - // to network config. - // if (CurrentTimeMS - pEthernetDriver->GetFsmStartTime () > (60000)) - // { - // logcon (F ("Ethernet Failed to connect")); - // fsm_Eth_state_ConnectionFailed_imp.Init (); - // } - - // DEBUG_END; -} // fsm_Eth_state_ConnectingToEth::Poll - /*****************************************************************************/ void fsm_Eth_state_ConnectingToEth::OnConnect () { // DEBUG_START; pEthernetDriver->SetUpIp (); + fsm_Eth_state_WaitForIP_imp.Init (); // DEBUG_END; @@ -546,7 +528,8 @@ void fsm_Eth_state_ConnectingToEth::OnGotIp () { // DEBUG_START; - fsm_Eth_state_ConnectedToEth_imp.Init (); + fsm_Eth_state_GotIp_imp.Init (); + pEthernetDriver->SetUpIp (); // DEBUG_END; @@ -554,7 +537,7 @@ void fsm_Eth_state_ConnectingToEth::OnGotIp () /*****************************************************************************/ /*****************************************************************************/ -void fsm_Eth_state_ConnectedToEth::Init () +void fsm_Eth_state_WaitForIP::Init () { // DEBUG_START; @@ -562,56 +545,62 @@ void fsm_Eth_state_ConnectedToEth::Init () pEthernetDriver->AnnounceState (); pEthernetDriver->SetFsmStartTime (millis ()); - logcon (String (F ("Ethernet Connected with IP: ")) + pEthernetDriver->GetIpAddress ().toString ()); - // DEBUG_V (String (" gateway: ") + pEthernetDriver->GetIpGateway ().toString ()); - // DEBUG_V (String (" netmask: ") + pEthernetDriver->GetIpSubNetMask ().toString ()); + // DEBUG_END; - pEthernetDriver->NetworkStateChanged (true); +} // fsm_Eth_state_WaitForIP::Init + +/*****************************************************************************/ +void fsm_Eth_state_WaitForIP::OnGotIp () +{ + // DEBUG_START; + + fsm_Eth_state_GotIp_imp.Init (); // DEBUG_END; -} // fsm_Eth_state_ConnectedToEth::Init +} // fsm_Eth_state_WaitForIP::OnGotIp /*****************************************************************************/ -void fsm_Eth_state_ConnectedToEth::OnDisconnect () +void fsm_Eth_state_WaitForIP::OnDisconnect () { // DEBUG_START; - fsm_Eth_state_ConnectionFailed_imp.Init (); - pEthernetDriver->NetworkStateChanged (false); + fsm_Eth_state_ConnectingToEth_imp.Init (); // DEBUG_END; -} // fsm_Eth_state_ConnectedToEth::OnDisconnect +} // fsm_Eth_state_WaitForIP::OnDisconnect /*****************************************************************************/ /*****************************************************************************/ -void fsm_Eth_state_ConnectionFailed::Init () +void fsm_Eth_state_GotIp::Init () { // DEBUG_START; pEthernetDriver->SetFsmState (this); pEthernetDriver->AnnounceState (); - pEthernetDriver->NetworkStateChanged (false); + pEthernetDriver->NetworkStateChanged (true); - ETH_m.stop (); + logcon (String (F ("Ethernet Connected with IP: ")) + pEthernetDriver->GetIpAddress ().toString ()); + // DEBUG_V (String (" gateway: ") + pEthernetDriver->GetIpGateway ().toString ()); + // DEBUG_V (String (" netmask: ") + pEthernetDriver->GetIpSubNetMask ().toString ()); // DEBUG_END; -} // fsm_Eth_state_ConnectionFailed::Init +} // fsm_Eth_state_GotIp::Init /*****************************************************************************/ -void fsm_Eth_state_ConnectionFailed::Poll () +void fsm_Eth_state_GotIp::OnDisconnect () { // DEBUG_START; + pEthernetDriver->NetworkStateChanged (false); + // take some recovery action fsm_Eth_state_ConnectingToEth_imp.Init (); - ETH_m.start (); - // DEBUG_END; -} // fsm_Eth_state_ConnectionFailed::Poll +} // fsm_Eth_state_GotIp::OnDisconnect /*****************************************************************************/ /*****************************************************************************/ @@ -625,6 +614,6 @@ void fsm_Eth_state_DeviceInitFailed::Init () // DEBUG_END; -} // fsm_Eth_state_ConnectionFailed::Init +} // fsm_Eth_state_DeviceInitFailed::Init #endif // def SUPPORT_ETHERNET diff --git a/ESPixelStick/src/network/EthernetDriver.hpp b/ESPixelStick/src/network/EthernetDriver.hpp index 63b6f7fc6..5920eb0d0 100644 --- a/ESPixelStick/src/network/EthernetDriver.hpp +++ b/ESPixelStick/src/network/EthernetDriver.hpp @@ -99,8 +99,8 @@ class c_EthernetDriver protected: friend class fsm_Eth_state_Boot; friend class fsm_Eth_state_ConnectingToEth; - friend class fsm_Eth_state_ConnectedToEth; - friend class fsm_Eth_state_ConnectionFailed; + friend class fsm_Eth_state_WaitForIP; + friend class fsm_Eth_state_GotIp; friend class fsm_Eth_state_DeviceInitFailed; friend class fsm_Eth_state; fsm_Eth_state * pCurrentFsmState = nullptr; @@ -144,40 +144,40 @@ class fsm_Eth_state_PoweringUp : public fsm_Eth_state class fsm_Eth_state_ConnectingToEth : public fsm_Eth_state { public: - virtual void Poll (void); + virtual void Poll (void) {} virtual void Init (void); virtual void GetStateName (String& sName) { sName = F ("Connecting"); } virtual void OnConnect (void); virtual void OnGotIp (void); - virtual void OnDisconnect (void) { LOG_PORT.print ("."); } + virtual void OnDisconnect (void) {} }; // fsm_Eth_state_ConnectingToEth /*****************************************************************************/ -class fsm_Eth_state_ConnectedToEth : public fsm_Eth_state +class fsm_Eth_state_WaitForIP : public fsm_Eth_state { public: virtual void Poll (void) {} virtual void Init (void); - virtual void GetStateName (String& sName) { sName = F ("Connected"); } + virtual void GetStateName (String& sName) { sName = F ("Wait for IP Address"); } virtual void OnConnect (void) {} - virtual void OnGotIp (void) {} + virtual void OnGotIp (void); virtual void OnDisconnect (void); -}; // fsm_Eth_state_ConnectedToEth +}; // fsm_Eth_state_WaitForIP /*****************************************************************************/ -class fsm_Eth_state_ConnectionFailed : public fsm_Eth_state +class fsm_Eth_state_GotIp : public fsm_Eth_state { public: - virtual void Poll (void); + virtual void Poll (void) {} virtual void Init (void); - virtual void GetStateName (String& sName) { sName = F ("Connection Failed"); } + virtual void GetStateName (String& sName) { sName = F ("Got IP"); } virtual void OnConnect (void) {} virtual void OnGotIp (void) {} - virtual void OnDisconnect (void) {} + virtual void OnDisconnect (void); -}; // fsm_Eth_state_ConnectionFailed +}; // fsm_Eth_state_GotIp /*****************************************************************************/ class fsm_Eth_state_DeviceInitFailed : public fsm_Eth_state From 0dab5eb7027d7a8eb955dfb57e1782653fbea20f Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 14:34:03 -0500 Subject: [PATCH 02/13] Initial version to detect OS and use correct mklittlfs for esp32 builds --- .scripts/replace_fs.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .scripts/replace_fs.py diff --git a/.scripts/replace_fs.py b/.scripts/replace_fs.py new file mode 100644 index 000000000..a06d5c86a --- /dev/null +++ b/.scripts/replace_fs.py @@ -0,0 +1,19 @@ +Import("env") +import platform + +os_name = platform.system().lower() + +mkfsPath = "./dist/bin/" +if "windows" == os_name: + mkfsPath += "win32/mklittlefs.exe" +elif "linux" == os_name: + mkfsPath += "linux64/mklittlefs" +elif "linux64" == os_name: + mkfsPath += "linux64/mklittlefs" +elif "macos" == os_name: + mkfsPath += "macos/mklittlefs" +else: + print("ERROR: Could not determine OS type. Got: " + str(os_name)) + +print("Replace MKSPIFFSTOOL with " + mkfsPath) +env.Replace (MKSPIFFSTOOL = mkfsPath) From 54fbfa096477ae6003fe4e54e5ca6fbfe371ae11 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 16:30:52 -0500 Subject: [PATCH 03/13] Corrected the use of the SUPPORT_RMT_OUTPUT definition. --- ESPixelStick/src/output/OutputMgr.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ESPixelStick/src/output/OutputMgr.cpp b/ESPixelStick/src/output/OutputMgr.cpp index 606ccd3a5..26589ae08 100644 --- a/ESPixelStick/src/output/OutputMgr.cpp +++ b/ESPixelStick/src/output/OutputMgr.cpp @@ -70,7 +70,7 @@ static const OutputTypeXlateMap_t OutputTypeXlateMap[c_OutputMgr::e_OutputType:: #ifdef SUPPORT_OutputType_UCS1903 {c_OutputMgr::e_OutputType::OutputType_UCS1903, "UCS1903" }, -#endif // def SUPPORT_OutputType_TM1814 +#endif // def SUPPORT_OutputType_UCS1903 #ifdef SUPPORT_OutputType_TM1814 {c_OutputMgr::e_OutputType::OutputType_TM1814, "TM1814" }, @@ -610,7 +610,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, #ifdef SUPPORT_OutputType_UCS1903 case e_OutputType::OutputType_UCS1903: { -#ifdef SUPPORT_RMT +#ifdef SUPPORT_RMT_OUTPUT if (OM_IS_RMT) { // logcon (CN_stars + String (F (" Starting TM1814 RMT for channel '")) + ChannelIndex + "'. " + CN_stars); @@ -618,7 +618,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, // DEBUG_V (""); break; } -#endif // def SUPPORT_RMT +#endif // def SUPPORT_RMT_OUTPUT // DEBUG_V (""); if (OM_IS_UART) { @@ -638,7 +638,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, #ifdef SUPPORT_OutputType_TM1814 case e_OutputType::OutputType_TM1814: { -#ifdef SUPPORT_RMT +#ifdef SUPPORT_RMT_OUTPUT if (OM_IS_RMT) { // logcon (CN_stars + String (F (" Starting TM1814 RMT for channel '")) + ChannelIndex + "'. " + CN_stars); @@ -646,7 +646,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, // DEBUG_V (""); break; } -#endif // def SUPPORT_RMT +#endif // def SUPPORT_RMT_OUTPUT // DEBUG_V (""); if (OM_IS_UART) { @@ -704,7 +704,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, #ifdef SUPPORT_OutputType_GS8208 case e_OutputType::OutputType_GS8208: { -#ifdef SUPPORT_RMT +#ifdef SUPPORT_RMT_OUTPUT if (OM_IS_RMT) { // logcon (CN_stars + String (F (" Starting GS8208 RMT for channel '")) + ChannelIndex + "'. " + CN_stars); @@ -712,7 +712,7 @@ void c_OutputMgr::InstantiateNewOutputChannel (e_OutputChannelIds ChannelIndex, // DEBUG_V (""); break; } -#endif // def SUPPORT_RMT +#endif // def SUPPORT_RMT_OUTPUT // DEBUG_V (""); if (OM_IS_UART) { From b3221c8c4984ebdb62266ff8429b5873af0b3863 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 16:32:17 -0500 Subject: [PATCH 04/13] Modifications to support a custom partition scheme for ESP32 builds allowing a larger configuration set. --- ESP32_partitions.csv | 6 ++++++ ESP8266_loader.ld | 29 +++++++++++++++++++++++++++++ platformio.ini | 5 +++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 ESP32_partitions.csv create mode 100644 ESP8266_loader.ld diff --git a/ESP32_partitions.csv b/ESP32_partitions.csv new file mode 100644 index 000000000..176e23b1c --- /dev/null +++ b/ESP32_partitions.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x1D0000, +app1, app, ota_1, 0x1E0000,0x1D0000, +spiffs, data, spiffs, 0x3B0000,0x50000, diff --git a/ESP8266_loader.ld b/ESP8266_loader.ld new file mode 100644 index 000000000..18f4e217e --- /dev/null +++ b/ESP8266_loader.ld @@ -0,0 +1,29 @@ +/* +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x009000, 0x004000, +otadata, data, ota, 0x00E000, 0x002000, +phy_init, data, phy, 0x00F000, 0x001000 +app0, app, ota_0, 0x010000, 0x1D0000, +app1, app, ota_1, 0x1E0000, 0x1D0000, +spiffs, data, spiffs, 0x3B0000, 0x050000, +*/ + +MEMORY +{ + dport0_0_seg : org = 0x3FF00000, len = 0x10 + dram0_0_seg : org = 0x3FFE8000, len = 0x14000 + irom0_0_seg : org = 0x40201010, len = 0x79ff0 +} + +PROVIDE ( _FS_start = 0x4027B000 ); +PROVIDE ( _FS_end = 0x402FB000 ); +PROVIDE ( _FS_page = 0x100 ); +PROVIDE ( _FS_block = 0x2000 ); +PROVIDE ( _EEPROM_start = 0x402fb000 ); +/* The following symbols are DEPRECATED and will be REMOVED in a future release */ +PROVIDE ( _SPIFFS_start = 0x4027B000 ); +PROVIDE ( _SPIFFS_end = 0x402FB000 ); +PROVIDE ( _SPIFFS_page = 0x100 ); +PROVIDE ( _SPIFFS_block = 0x2000 ); + +INCLUDE "local.eagle.app.v6.common.ld" \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 84a6881cb..6a89e8b27 100644 --- a/platformio.ini +++ b/platformio.ini @@ -40,7 +40,7 @@ extra_scripts = ; https://docs.platformio.org/en/latest/platforms/espressif8266.html ; ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; [esp8266] -platform = espressif8266 @ 3.2.0 ; Arduino Core 3.0.2 +platform = espressif8266 @ 3.2.0 ; Arduino Core board_build.f_cpu = 160000000L board_build.filesystem = littlefs board_build.ldscript = eagle.flash.4m2m.ld @@ -68,13 +68,14 @@ lib_deps = [esp32] platform = espressif32 board_build.filesystem = littlefs -board_build.partitions = min_spiffs.csv +board_build.partitions = ESP32_partitions.csv monitor_filters = esp32_exception_decoder build_flags = ${env.build_flags} lib_deps = ${env.lib_deps} esphome/AsyncTCP-esphome @ 1.2.2 +extra_scripts = .scripts/replace_fs.py ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; ; ESP32 pulling from upstream core ; From 194a9cc7a41c4fd5de1b63724358ea0fdd7e0f54 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 16:32:50 -0500 Subject: [PATCH 05/13] Added Flash size summary to the boot output. --- ESPixelStick/src/FileMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESPixelStick/src/FileMgr.cpp b/ESPixelStick/src/FileMgr.cpp index 9835e8137..2d049444f 100644 --- a/ESPixelStick/src/FileMgr.cpp +++ b/ESPixelStick/src/FileMgr.cpp @@ -64,7 +64,7 @@ void c_FileMgr::Begin () } else { - logcon (F ("Flash file system initialized.")); + logcon (String (F ("Flash file system initialized. Used = ")) + String (LittleFS.usedBytes ()) + String (F (" out of ")) + String (LittleFS.totalBytes()) ); //listDir (LittleFS, String ("/"), 3); } From 13d4fa6c0528e2dd5fe4537cbac132fa1e3d5082 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 16:36:22 -0500 Subject: [PATCH 06/13] Restored support for pixels that had been disabled due to not enough room in the littlefs --- ESPixelStick/src/GPIO_Defs.hpp | 4 ++-- ESPixelStick/src/GPIO_Defs_ESP32_generic.hpp | 4 ++-- html/{apa102.NotUsedhtml => apa102.html} | 0 html/{gs8208.NotUsedhtml => gs8208.html} | 0 html/{tls3001.NotUsedhtml => tls3001.html} | 0 html/{tm1814.NotUsedhtml => tm1814.html} | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename html/{apa102.NotUsedhtml => apa102.html} (100%) rename html/{gs8208.NotUsedhtml => gs8208.html} (100%) rename html/{tls3001.NotUsedhtml => tls3001.html} (100%) rename html/{tm1814.NotUsedhtml => tm1814.html} (100%) diff --git a/ESPixelStick/src/GPIO_Defs.hpp b/ESPixelStick/src/GPIO_Defs.hpp index 5f5ebc2f9..7ce7fca9b 100644 --- a/ESPixelStick/src/GPIO_Defs.hpp +++ b/ESPixelStick/src/GPIO_Defs.hpp @@ -80,8 +80,8 @@ typedef enum // #define BOARD_ESP32_LOLIN_D32_PRO_ETH // #define BOARD_ESP32_MH_ET_LIVE_MiniKit -// #define SUPPORT_OutputType_UCS1903 -// #define SUPPORT_OutputType_GS8208 +#define SUPPORT_OutputType_UCS1903 +#define SUPPORT_OutputType_GS8208 // Platform specific GPIO definitions #if defined (BOARD_ESP32_CAM) diff --git a/ESPixelStick/src/GPIO_Defs_ESP32_generic.hpp b/ESPixelStick/src/GPIO_Defs_ESP32_generic.hpp index 81c51e2e1..4c78faf79 100644 --- a/ESPixelStick/src/GPIO_Defs_ESP32_generic.hpp +++ b/ESPixelStick/src/GPIO_Defs_ESP32_generic.hpp @@ -32,8 +32,8 @@ #define RMT_LAST OutputChannelId_RMT_4 #define SUPPORT_OutputType_WS2801 // requires a change in the html directory -// #define SUPPORT_OutputType_APA102 // requires a change in the html directory -// #define SUPPORT_OutputType_TM1814 // requires a change in the html directory +#define SUPPORT_OutputType_APA102 // requires a change in the html directory +#define SUPPORT_OutputType_TM1814 // requires a change in the html directory // #define SUPPORT_OutputType_TLS3001 // requires a change in the html directory #define SUPPORT_RELAY_OUTPUT diff --git a/html/apa102.NotUsedhtml b/html/apa102.html similarity index 100% rename from html/apa102.NotUsedhtml rename to html/apa102.html diff --git a/html/gs8208.NotUsedhtml b/html/gs8208.html similarity index 100% rename from html/gs8208.NotUsedhtml rename to html/gs8208.html diff --git a/html/tls3001.NotUsedhtml b/html/tls3001.html similarity index 100% rename from html/tls3001.NotUsedhtml rename to html/tls3001.html diff --git a/html/tm1814.NotUsedhtml b/html/tm1814.html similarity index 100% rename from html/tm1814.NotUsedhtml rename to html/tm1814.html From 577a675d4a0e79c96567813850f6a01f862708a7 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Wed, 2 Feb 2022 17:00:38 -0500 Subject: [PATCH 07/13] Removed advanced summary for ESP8266 which does not support the needed calls. --- ESPixelStick/src/FileMgr.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ESPixelStick/src/FileMgr.cpp b/ESPixelStick/src/FileMgr.cpp index 2d049444f..15fdce2b0 100644 --- a/ESPixelStick/src/FileMgr.cpp +++ b/ESPixelStick/src/FileMgr.cpp @@ -64,7 +64,12 @@ void c_FileMgr::Begin () } else { +#ifdef ARDUINO_ARCH_ESP32 logcon (String (F ("Flash file system initialized. Used = ")) + String (LittleFS.usedBytes ()) + String (F (" out of ")) + String (LittleFS.totalBytes()) ); +#else + logcon (String (F ("Flash file system initialized."))); +#endif // def ARDUINO_ARCH_ESP32 + //listDir (LittleFS, String ("/"), 3); } From a3fb593d86cb3f9c9e6bfbdc07671e2d057622d2 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Thu, 3 Feb 2022 06:44:02 -0500 Subject: [PATCH 08/13] Changes to resolve Codacity complaints --- .scripts/replace_fs.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.scripts/replace_fs.py b/.scripts/replace_fs.py index a06d5c86a..43fa2bbae 100644 --- a/.scripts/replace_fs.py +++ b/.scripts/replace_fs.py @@ -1,19 +1,19 @@ -Import("env") import platform +Import ("env") -os_name = platform.system().lower() +OS_NAME = platform.system().lower() +FS_PATH = "./dist/bin/" -mkfsPath = "./dist/bin/" -if "windows" == os_name: - mkfsPath += "win32/mklittlefs.exe" -elif "linux" == os_name: - mkfsPath += "linux64/mklittlefs" -elif "linux64" == os_name: - mkfsPath += "linux64/mklittlefs" -elif "macos" == os_name: - mkfsPath += "macos/mklittlefs" +if OS_NAME == "windows" : + FS_PATH += "win32/mklittlefs.exe" +elif OS_NAME == "linux" : + FS_PATH += "linux64/mklittlefs" +elif OS_NAME == "linux64" : + FS_PATH += "linux64/mklittlefs" +elif OS_NAME == "macos" : + FS_PATH += "macos/mklittlefs" else: - print("ERROR: Could not determine OS type. Got: " + str(os_name)) + print("ERROR: Could not determine OS type. Got: " + str (OS_NAME)) -print("Replace MKSPIFFSTOOL with " + mkfsPath) -env.Replace (MKSPIFFSTOOL = mkfsPath) +print("Replace MKSPIFFSTOOL with " + FS_PATH) +env.Replace (MKSPIFFSTOOL = FS_PATH) From e9695287179b72806f7eda6244598366c70c519d Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Thu, 3 Feb 2022 10:43:16 -0500 Subject: [PATCH 09/13] Corrected detection of MacOS --- .scripts/replace_fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/replace_fs.py b/.scripts/replace_fs.py index 43fa2bbae..f19512818 100644 --- a/.scripts/replace_fs.py +++ b/.scripts/replace_fs.py @@ -10,7 +10,7 @@ FS_PATH += "linux64/mklittlefs" elif OS_NAME == "linux64" : FS_PATH += "linux64/mklittlefs" -elif OS_NAME == "macos" : +elif OS_NAME == "darwin" : FS_PATH += "macos/mklittlefs" else: print("ERROR: Could not determine OS type. Got: " + str (OS_NAME)) From 1ae917f5400c2c0d587c0fe96b10519a698cc491 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Thu, 3 Feb 2022 13:41:16 -0500 Subject: [PATCH 10/13] Updated for the latest set of platforms. --- dist/firmware/firmware.json | 479 ++++++++++++++++++++++++------------ 1 file changed, 327 insertions(+), 152 deletions(-) diff --git a/dist/firmware/firmware.json b/dist/firmware/firmware.json index 782c244d5..1bbb5373d 100644 --- a/dist/firmware/firmware.json +++ b/dist/firmware/firmware.json @@ -1,157 +1,332 @@ { "release": "ESPixelStick 4.0-dev - Development Release", "baudrate": "115200", - "boards": [ - { - "name": "ESPixelStick V3", - "description": "Official hardware from Forkineye", - "chip": "esp8266", - "appbin": "esp8266/espsv3-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash" - }, - "binfiles": [ - { - "name": "esp8266/espsv3-app.bin", - "offset": "0x0" - } - ], - "filesystem": { - "page": "256", - "block": "8192", - "size": "2072576", - "offset": "0x200000" - } - }, - { - "name": "Wemos D1 Mini", - "description": "Generic Wemos D1 Mini for DIY builds", - "chip": "esp8266", - "appbin": "esp8266/d1_mini-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash" - }, - "binfiles": [ - { - "name": "esp8266/d1_mini-app.bin", - "offset": "0x0" - } - ], - "filesystem": { - "page": "256", - "block": "8192", - "size": "2072576", - "offset": "0x200000" - } - }, - { - "name": "Lolin D32 Pro", - "description": "Lolin D32 Pro module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d32_pro-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d32_pro-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/d32_pro-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d32_pro-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" - } - }, - { - "name": "ESP32 CAM", - "description": "ESP32 CAM for DIY builds", - "chip": "esp32", - "appbin": "esp32/esp32_cam-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/esp32_cam-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/esp32_cam-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/esp32_cam-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" - } - }, - { - "name": "Generic ESP32 4MB", - "description": "Generic ESP32 with 4MB flash layout for DIY builds", - "chip": "esp32", - "appbin": "esp32/d1_mini32-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d1_mini32-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/d1_mini32-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d1_mini32-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" - } + "boards": [ + { + "name": "ESPixelStick V3", + "description": "Official hardware from Forkineye", + "chip": "esp8266", + "appbin": "esp8266/espsv3-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash" + }, + "binfiles": [ + { + "name": "esp8266/espsv3-app.bin", + "offset": "0x0" + } + ], + "filesystem": { + "page": "256", + "block": "8192", + "size": "2072576", + "offset": "0x200000" + } + }, + { + "name": "Wemos D1 Mini", + "description": "Generic Wemos D1 Mini for DIY builds", + "chip": "esp8266", + "appbin": "esp8266/d1_mini-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash" + }, + "binfiles": [ + { + "name": "esp8266/d1_mini-app.bin", + "offset": "0x0" + } + ], + "filesystem": { + "page": "256", + "block": "8192", + "size": "2072576", + "offset": "0x200000" + } + }, + { + "name": "D1 Mini Mhetesp32minikit", + "description": "D1 Mini Mhetesp32minikit module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini_mhetesp32minikit-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini_mhetesp32minikit-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini_mhetesp32minikit-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini_mhetesp32minikit-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "D1 Mini32 ETH", + "description": "D1 ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32_eth-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32_eth-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32_eth-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32_eth-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "D1 Mini32", + "description": "D1 ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "D32 PRO ETH", + "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d32_pro_eth-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d32_pro_eth-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d32_pro_eth-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d32_pro_eth-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "D32 PRO", + "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d32_pro-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d32_pro-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d32_pro-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d32_pro-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "ESP32 CAM", + "description": "ESP32 CAM for DIY builds", + "chip": "esp32", + "appbin": "esp32/esp32_cam-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/esp32_cam-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/esp32_cam-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/esp32_cam-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "ESP32 TTGO T8", + "description": "ESP32 for DIY builds", + "chip": "esp32", + "appbin": "esp32/esp32_ttgo_t8-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/esp32_ttgo_t8-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/esp32_ttgo_t8-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/esp32_ttgo_t8-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + }, + { + "name": "Generic ESP32 4MB", + "description": "Generic ESP32 with 4MB flash layout for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32-app.bin", + "offset": "0x10000" } - ] + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } + } + ] } \ No newline at end of file From fc8c86d236f6d8d9a0d25e24cfe54fe980564f27 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Thu, 3 Feb 2022 14:32:29 -0500 Subject: [PATCH 11/13] Added littlefs status reporting. --- ESPixelStick/src/FileMgr.cpp | 14 ++++++++++++++ ESPixelStick/src/FileMgr.hpp | 1 + ESPixelStick/src/WebMgr.cpp | 4 ++++ html/index.html | 2 ++ html/script.js | 17 +++++++++++++++++ 5 files changed, 38 insertions(+) diff --git a/ESPixelStick/src/FileMgr.cpp b/ESPixelStick/src/FileMgr.cpp index 15fdce2b0..303109ceb 100644 --- a/ESPixelStick/src/FileMgr.cpp +++ b/ESPixelStick/src/FileMgr.cpp @@ -127,6 +127,20 @@ void c_FileMgr::GetConfig (JsonObject& json) } // GetConfig +//----------------------------------------------------------------------------- +void c_FileMgr::GetStatus (JsonObject& json) +{ + // DEBUG_START; + +#ifdef ARDUINO_ARCH_ESP32 + json[F ("size")] = LittleFS.totalBytes (); + json[F ("used")] = LittleFS.usedBytes (); +#endif // def ARDUINO_ARCH_ESP32 + + // DEBUG_END; + +} // GetConfig + //----------------------------------------------------------------------------- void c_FileMgr::SetSpiIoPins () { diff --git a/ESPixelStick/src/FileMgr.hpp b/ESPixelStick/src/FileMgr.hpp index 402ba8e81..ab2abaac5 100644 --- a/ESPixelStick/src/FileMgr.hpp +++ b/ESPixelStick/src/FileMgr.hpp @@ -40,6 +40,7 @@ class c_FileMgr void Poll (); void GetConfig (JsonObject& json); bool SetConfig (JsonObject& json); + void GetStatus (JsonObject& json); void handleFileUpload (const String & filename, size_t index, uint8_t * data, size_t len, bool final); diff --git a/ESPixelStick/src/WebMgr.cpp b/ESPixelStick/src/WebMgr.cpp index 6da082658..dd11d9868 100644 --- a/ESPixelStick/src/WebMgr.cpp +++ b/ESPixelStick/src/WebMgr.cpp @@ -662,6 +662,10 @@ void c_WebMgr::ProcessXJRequest (AsyncWebSocketClient* client) OutputMgr.GetStatus (status); // DEBUG_V (""); + // Get File Manager Stats + FileMgr.GetStatus (system); + // DEBUG_V (""); + memset (&WebSocketFrameCollectionBuffer[0], 0x00, sizeof (WebSocketFrameCollectionBuffer)); strcpy (WebSocketFrameCollectionBuffer, "XJ"); size_t msgOffset = strlen (WebSocketFrameCollectionBuffer); diff --git a/html/index.html b/html/index.html index 83a8029ab..408548e24 100644 --- a/html/index.html +++ b/html/index.html @@ -54,6 +54,8 @@ + +
Free Heap
Up Time
Flash Total
Flash Used
diff --git a/html/script.js b/html/script.js index cc0ef6d78..13acb340e 100644 --- a/html/script.js +++ b/html/script.js @@ -1667,6 +1667,23 @@ function ProcessReceivedJsonStatusMessage(data) str += ("0" + date.getUTCSeconds()).slice(-2); $('#x_uptime').text(str); + if ({}.hasOwnProperty.call(System, 'used')) { + $('#i_size').removeClass("hidden"); + $('#x_size').removeClass("hidden"); + $('#x_size').text(System.size); + + $('#i_used').removeClass("hidden"); + $('#x_used').removeClass("hidden"); + $('#x_used').text(System.used); + } + else + { + $('#i_size').addClass("hidden"); + $('#x_size').addClass("hidden"); + $('#i_used').addClass("hidden"); + $('#x_used').addClass("hidden"); + } + if (true === System.SDinstalled) { $("#li-filemanagement").removeClass("hidden"); From 2221136ca6e9a9260666fcc5342673cdc0de22af Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Fri, 4 Feb 2022 07:13:32 -0500 Subject: [PATCH 12/13] restored original tab spacing --- dist/firmware/firmware.json | 618 ++++++++++++++++++------------------ 1 file changed, 309 insertions(+), 309 deletions(-) diff --git a/dist/firmware/firmware.json b/dist/firmware/firmware.json index 1bbb5373d..20c7f0b0c 100644 --- a/dist/firmware/firmware.json +++ b/dist/firmware/firmware.json @@ -1,332 +1,332 @@ { "release": "ESPixelStick 4.0-dev - Development Release", "baudrate": "115200", - "boards": [ - { - "name": "ESPixelStick V3", - "description": "Official hardware from Forkineye", - "chip": "esp8266", - "appbin": "esp8266/espsv3-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash" - }, - "binfiles": [ - { - "name": "esp8266/espsv3-app.bin", - "offset": "0x0" - } - ], - "filesystem": { - "page": "256", - "block": "8192", - "size": "2072576", - "offset": "0x200000" - } - }, - { - "name": "Wemos D1 Mini", - "description": "Generic Wemos D1 Mini for DIY builds", - "chip": "esp8266", - "appbin": "esp8266/d1_mini-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash" - }, - "binfiles": [ - { - "name": "esp8266/d1_mini-app.bin", - "offset": "0x0" - } - ], - "filesystem": { - "page": "256", - "block": "8192", - "size": "2072576", - "offset": "0x200000" - } - }, - { - "name": "D1 Mini Mhetesp32minikit", - "description": "D1 Mini Mhetesp32minikit module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d1_mini_mhetesp32minikit-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d1_mini_mhetesp32minikit-bootloader.bin", - "offset": "0x1000" + "boards": [ + { + "name": "ESPixelStick V3", + "description": "Official hardware from Forkineye", + "chip": "esp8266", + "appbin": "esp8266/espsv3-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash" + }, + "binfiles": [ + { + "name": "esp8266/espsv3-app.bin", + "offset": "0x0" + } + ], + "filesystem": { + "page": "256", + "block": "8192", + "size": "2072576", + "offset": "0x200000" + } }, { - "name": "esp32/d1_mini_mhetesp32minikit-partitions.bin", - "offset": "0x8000" + "name": "Wemos D1 Mini", + "description": "Generic Wemos D1 Mini for DIY builds", + "chip": "esp8266", + "appbin": "esp8266/d1_mini-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash" + }, + "binfiles": [ + { + "name": "esp8266/d1_mini-app.bin", + "offset": "0x0" + } + ], + "filesystem": { + "page": "256", + "block": "8192", + "size": "2072576", + "offset": "0x200000" + } }, { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" + "name": "D1 Mini Mhetesp32minikit", + "description": "D1 Mini Mhetesp32minikit module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini_mhetesp32minikit-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini_mhetesp32minikit-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini_mhetesp32minikit-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini_mhetesp32minikit-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/d1_mini_mhetesp32minikit-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "D1 Mini32 ETH", - "description": "D1 ESP32 module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d1_mini32_eth-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d1_mini32_eth-bootloader.bin", - "offset": "0x1000" + "name": "D1 Mini32 ETH", + "description": "D1 ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32_eth-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32_eth-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32_eth-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32_eth-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/d1_mini32_eth-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d1_mini32_eth-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "D1 Mini32", - "description": "D1 ESP32 module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d1_mini32-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d1_mini32-bootloader.bin", - "offset": "0x1000" + "name": "D1 Mini32", + "description": "D1 ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/d1_mini32-partitions.bin", - "offset": "0x8000" + "name": "D32 PRO ETH", + "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d32_pro_eth-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d32_pro_eth-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d32_pro_eth-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d32_pro_eth-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d1_mini32-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "D32 PRO ETH", - "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d32_pro_eth-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d32_pro_eth-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/d32_pro_eth-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d32_pro_eth-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "D32 PRO", - "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", - "chip": "esp32", - "appbin": "esp32/d32_pro-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d32_pro-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/d32_pro-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/d32_pro-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "ESP32 CAM", - "description": "ESP32 CAM for DIY builds", - "chip": "esp32", - "appbin": "esp32/esp32_cam-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/esp32_cam-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/esp32_cam-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/esp32_cam-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "ESP32 TTGO T8", - "description": "ESP32 for DIY builds", - "chip": "esp32", - "appbin": "esp32/esp32_ttgo_t8-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/esp32_ttgo_t8-bootloader.bin", - "offset": "0x1000" - }, - { - "name": "esp32/esp32_ttgo_t8-partitions.bin", - "offset": "0x8000" - }, - { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" - }, - { - "name": "esp32/esp32_ttgo_t8-app.bin", - "offset": "0x10000" - } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - }, - { - "name": "Generic ESP32 4MB", - "description": "Generic ESP32 with 4MB flash layout for DIY builds", - "chip": "esp32", - "appbin": "esp32/d1_mini32-app.bin", - "esptool": { - "baudrate": "460800", - "options": "--before default_reset --after hard_reset", - "flashcmd": "write_flash -z" - }, - "binfiles": [ - { - "name": "esp32/d1_mini32-bootloader.bin", - "offset": "0x1000" + "name": "D32 PRO", + "description": "D32 PRO ESP32 module with PSRAM support for DIY builds", + "chip": "esp32", + "appbin": "esp32/d32_pro-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d32_pro-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d32_pro-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d32_pro-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/d1_mini32-partitions.bin", - "offset": "0x8000" + "name": "ESP32 CAM", + "description": "ESP32 CAM for DIY builds", + "chip": "esp32", + "appbin": "esp32/esp32_cam-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/esp32_cam-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/esp32_cam-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/esp32_cam-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/boot_app0.bin", - "offset": "0xe000" + "name": "ESP32 TTGO T8", + "description": "ESP32 for DIY builds", + "chip": "esp32", + "appbin": "esp32/esp32_ttgo_t8-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/esp32_ttgo_t8-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/esp32_ttgo_t8-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/esp32_ttgo_t8-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } }, { - "name": "esp32/d1_mini32-app.bin", - "offset": "0x10000" + "name": "Generic ESP32 4MB", + "description": "Generic ESP32 with 4MB flash layout for DIY builds", + "chip": "esp32", + "appbin": "esp32/d1_mini32-app.bin", + "esptool": { + "baudrate": "460800", + "options": "--before default_reset --after hard_reset", + "flashcmd": "write_flash -z" + }, + "binfiles": [ + { + "name": "esp32/d1_mini32-bootloader.bin", + "offset": "0x1000" + }, + { + "name": "esp32/d1_mini32-partitions.bin", + "offset": "0x8000" + }, + { + "name": "esp32/boot_app0.bin", + "offset": "0xe000" + }, + { + "name": "esp32/d1_mini32-app.bin", + "offset": "0x10000" + } + ], + "filesystem": { + "page": "256", + "block": "4096", + "size": "0x50000", + "offset": "0x3B0000" + } } - ], - "filesystem": { - "page": "256", - "block": "4096", - "size": "0x50000", - "offset": "0x3B0000" - } - } - ] + ] } \ No newline at end of file From 7314d6e5eb2319d807a2c11b5c2cb6a958e87407 Mon Sep 17 00:00:00 2001 From: Martin Mueller Date: Fri, 4 Feb 2022 07:24:33 -0500 Subject: [PATCH 13/13] Restored comment --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 6a89e8b27..519ba2d6a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -40,7 +40,7 @@ extra_scripts = ; https://docs.platformio.org/en/latest/platforms/espressif8266.html ; ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~; [esp8266] -platform = espressif8266 @ 3.2.0 ; Arduino Core +platform = espressif8266 @ 3.2.0 ; Arduino Core 3.0.2 board_build.f_cpu = 160000000L board_build.filesystem = littlefs board_build.ldscript = eagle.flash.4m2m.ld