The card or the on-board flash is being formatted
What ArduPilot says:
- Format flash: Failed (N)
- Formatting flash using littlefs
- Format: Failed (N)
- Formatting flash
- Format flash: OK
- Format: OK
Also explained here: 2 more
- Formatting SDCard
- Mounted flash 0x0x… as littlefs
The ground station asked ArduPilot to format its file storage. Everything on it is erased: logs, Lua scripts, terrain data, saved mission and fence files. “Formatting SDCard” is followed by “Format: OK” or “Format: Failed (N)”. The lines about flash and littlefs are from 4.7, which can keep files on the on-board flash chip of boards with no card slot: “Mounted flash … as littlefs” at start-up is normal, and “Formatting flash” at start-up means it could not be opened (first use, or damaged) and was formatted by itself.
What to do, most likely first
“Format: Failed”: the card refuses to be written.
CheckTry the card in a computer. A card that has gone read-only, or shows a wrong size, is dead.
FixReplace the card. Copy your Lua scripts back to APM/scripts after any successful format.
Where to do it:Setup & Tuning Guide
The code that sends it
Format flash: Failed (N)
libraries/AP_Filesystem/AP_Filesystem_FlashMemory_LittleFS.cpp AP_Filesystem_FlashMemory_LittleFS::format_handler() · Open in ArduPilot Copter-4.7.1
Formatting flash using littlefs
libraries/AP_Filesystem/AP_Filesystem_FlashMemory_LittleFS.cpp AP_Filesystem_FlashMemory_LittleFS::format_handler() · Open in ArduPilot Copter-4.7.1
Format: Failed (N)
libraries/AP_Filesystem/AP_Filesystem_FATFS.cpp AP_Filesystem_FATFS::format_handler() · Open in ArduPilot Copter-4.7.1
Formatting flash
libraries/AP_Filesystem/AP_Filesystem_FlashMemory_LittleFS.cpp AP_Filesystem_FlashMemory_LittleFS::mount_filesystem() · Open in ArduPilot Copter-4.7.1
And 4 more messages, sent from the same places.