botofancalin/M5Stack-MultiApp-Advanced

M5Stack-SD-Updater

Closed this issue ยท 8 comments

Congrats for such a project, it's not easy to fit all this in just one sketch :-)

I've just tested the SD-Updater with this project and it seems to fit well, just to let you know you could easily maintain several themed versions of the M5Stack-MultiApp (i.e. WiFi tools, LoRa tools, games, utilities) and make them load each other from one extra menu.

This way you aren't limited by sketch size while still keeping the multi-app spirit :-)

Easy implementation:

pio lib install "M5Stack-SD-Updater" (will install globally so no need to pollute your /lib folder or even use a git submodule)

Add #include "M5StackUpdater.h" in your main.cpp

Compile your alternate MultiApps and copy the binaries on the microSD.

Call updateFromFS(SD, "/some-binary-name.bin"); from anywhere in your code when you need to load the alternate MultiApp.

I can do a pull request of this if you're interested.

I know about the sdupdater. I went the other way with this multiapp.
It was a personal challenge to add as much as possible on one project without need to reflash like the sdupdater do.
I added the libs to local storage because i modified them to fit the needs of this project. So any begginer can compile this firmware.
I can easely bypass the sketch size limit by making a custom partition table for ESP32 that will allow me to upload firmwares larger than 1310720 bytes.

Thanks for reopening this thread ๐Ÿ‘

You sure managed to fit many apps in there, how many more do you plan to add? I'm very curious to see how big this can grow :-)

I loved to play with your code, it's very clean and well assembled but I can't say I understood all of it as some OOP concepts are still nebulous to me ^^

The thing is I could easily get the sd menu loader to work without hitting any limitation at all and found the sd-loading feature is completive to the multi app in a very pleasant way.

Are you open to feature requests or suggestions?

it says:

FLASH SIZE: 4194304
SPIFFS SIZE: 1374476 
SPIFFS USED: 0

Is the SPIFFS_SIZE wrong? The binary size on my hard drive is 1.2MiB (1.253.056) and 1.374.476 seems big.
SPIFFS_USED=0 seems normal as the M5updater doesn't copy SPIFFS content.

Or maybe this is the real issue?

Could empty SPIFFS partition on M5Updater load eventually be solved by having the MultiApp auto-formatting SPIFFS & copying RadioStations.txt and index.html on first load?

hehe I see a good excuse to add a playlist editor app ๐Ÿ˜†
Also since there's a WiFi configurator, it would'nt be a problem to have the M5 download this file directly from your repo, right? โ˜Ž๏ธ ๐Ÿ 

okay I just found out the SD_data folder isn't supposed to be uploaded via SPIFFS lol