diff --git a/.scripts/replace_fs.py b/.scripts/replace_fs.py new file mode 100644 index 000000000..f19512818 --- /dev/null +++ b/.scripts/replace_fs.py @@ -0,0 +1,19 @@ +import platform +Import ("env") + +OS_NAME = platform.system().lower() +FS_PATH = "./dist/bin/" + +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 == "darwin" : + FS_PATH += "macos/mklittlefs" +else: + print("ERROR: Could not determine OS type. Got: " + str (OS_NAME)) + +print("Replace MKSPIFFSTOOL with " + FS_PATH) +env.Replace (MKSPIFFSTOOL = FS_PATH) 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/ESPixelStick/src/FileMgr.cpp b/ESPixelStick/src/FileMgr.cpp index 9835e8137..303109ceb 100644 --- a/ESPixelStick/src/FileMgr.cpp +++ b/ESPixelStick/src/FileMgr.cpp @@ -64,7 +64,12 @@ void c_FileMgr::Begin () } else { - logcon (F ("Flash file system initialized.")); +#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); } @@ -122,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/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/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/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 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) { diff --git a/dist/firmware/firmware.json b/dist/firmware/firmware.json index 782c244d5..20c7f0b0c 100644 --- a/dist/firmware/firmware.json +++ b/dist/firmware/firmware.json @@ -49,8 +49,148 @@ } }, { - "name": "Lolin D32 Pro", - "description": "Lolin D32 Pro module with PSRAM support for DIY builds", + "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": { @@ -79,8 +219,8 @@ "filesystem": { "page": "256", "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" + "size": "0x50000", + "offset": "0x3B0000" } }, { @@ -114,8 +254,43 @@ "filesystem": { "page": "256", "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" + "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" } }, { @@ -149,8 +324,8 @@ "filesystem": { "page": "256", "block": "4096", - "size": "0x30000", - "offset": "0x3D0000" + "size": "0x50000", + "offset": "0x3B0000" } } ] 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/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"); 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 diff --git a/platformio.ini b/platformio.ini index 84a6881cb..519ba2d6a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -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 ;