firmware icon indicating copy to clipboard operation
firmware copied to clipboard

I found solution "LittleFS is full", fix function in code

Open DESVOR8 opened this issue 8 months ago • 7 comments

Is your feature request related to a problem? Please describe. Yes, it’s a major problem. Currently, if LittleFS is full, a device running Bruce (1.14) becomes a "brick" 🧱. When you turn on the device, you see a big red "LittleFS is full" message. You cannot skip this screen or open the WebUI to delete unnecessary files.

Describe the solution you'd like I've found a solution by modifying a small function in core/sd_functions.cpp. By starting the Serial command handler before the error screen locks the device, users can recover their device via USB.

Replace the function with:

bool checkLittleFsSize() {
    if ((LittleFS.totalBytes() - LittleFS.usedBytes()) < 4096) {
        Serial.println(
            "LittleFS is full. Starting Serial cmd handler for delete files. Type `help` to get help."
        );
        startSerialCommandsHandlerTask(true);
        displayError("LittleFS is Full", true);
        return false;
    } else return true;
}

at core/sd_functions.cpp.

Note: Don't forget to add #include "core/serialcmds.h".

Describe alternatives you've considered I mod the code.

Additional context This is a very common issue in Bruce 1.14, especially on M5StickC devices which only have 3MB of LittleFS storage.

DESVOR8 avatar Mar 20 '26 07:03 DESVOR8

how do i do this this happend to me and im kinda new so idk what to do

k61468124-blip avatar Apr 24 '26 07:04 k61468124-blip

how do i do this this happend to me and im kinda new so idk what to do

If this happened with you, you need to reinstall fw with FULL erasing flash, and delete all files.

DESVOR8 avatar Apr 24 '26 08:04 DESVOR8

Is that a temporary solution, and is there a possibility that it's actually a bug?

JEONTAEMIN2007 avatar Apr 24 '26 11:04 JEONTAEMIN2007

Is that a temporary solution, and is there a possibility that it's actually a bug?

Well, my solution probably isn't working, but the report remains the same: the "little file system is full" error persists. Here are the facts about this phenomenon:

  1. If this happens while transferring files via the web interface, the device will freeze.
  2. After rebooting, this ominous message will appear.
  3. If your device hasn't rebooted, you still won't be able to save your files. When you open Files>LittleFS, you will just back to main menu.
  4. During the warning screen that appears after rebooting, literally nothing works. You can't bypass this screen and save your files, even though, according to the code, you can press any key to skip.
  5. When you start with this message, your device is literally bricked, the buttons don’t work, you can't start webui, you can't use serial commands, you can't revive your device without reinstall fw.
  6. From a code point of view, this message appears when the device has less than 4 kilobytes of memory; this was probably done to prevent the memory from being completely full. Also, when you turn on the device with this message, the Bruce config file does not load, which is why you cannot skip this screen.
  7. I haven't checked this, but it's POSSIBLE that if you use an SD card module, this problem will be partially solved, but it seems unlikely to me, so this is not a solution.

Before moving anything through the web interface, check the amount of free space. *My speech may be incorrect or sound different due to the fact that I'm using a translator.

DESVOR8 avatar Apr 24 '26 12:04 DESVOR8

As a permanent solution, I would suggest that when you launch the program with this sign, by pressing OK, you open a menu where you can delete unnecessary files.

DESVOR8 avatar Apr 24 '26 12:04 DESVOR8

Fixed on 1.16. Issue automatically closed after release

github-actions[bot] avatar Jul 24 '26 01:07 github-actions[bot]

im on 1.16.1 and this STILL happens.

Lucky-Mucky avatar Aug 31 '26 15:08 Lucky-Mucky