espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.28k stars 1.56k forks source link

SPIFFS mount failed (GIT8266O-545) #968

Open GarMingLi opened 3 years ago

GarMingLi commented 3 years ago

Environment

Problem Description

I needed to implement a Webserver, but the web page was too big, I couldn't use the COMPONENT_EMBED_TXTFILES method to embed the web page into the firmware of my app, so I had to create a new partition and use the file system general storage. According to the documentation tutorial, My custom partition file is as follows:

# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
ota_0,app,ota_0,0x10000,0xF0000,
ota_1,app,ota_1,0x110000,0xF0000,
storage,data,spiffs,  ,0x200000,

In both the Make build system and the CMake build system, I have added two commands to build the SPIFFS image:

Make: SPIFFS_IMAGE_FLASH_IN_PROJECT := 1 $(eval $(call spiffs_create_partition_image,storage,data)) CMake :

spiffs_create_partition_image(storage data FLASH_IN_PROJECT)

Output the following information after compilation: python /home/ljm/esp/ESP8266_RTOS_SDK/components/esptool_py/esptool/esptool.py --chip esp8266 --port /dev/ttyS8 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0xd000 /home/ljm/esp/code/Weather_2/build/ota_data_initial.bin 0x0000 /home/ljm/esp/code/Weather_2/build/bootloader/bootloader.bin 0x10000 /home/ljm/esp/code/Weather_2/build/Test.bin 0x8000 /home/ljm/esp/code/Weather_2/build/partitions.bin

However, no information about the SPIFFS image is found by checking the compilation information.

I ported the DEMO of SPIFFS to my project, and after compiling and running, the following errors occurred:

E (574) SPIFFS: mount failed, -10025
E (578) Main: Failed to mount or format filesystem
...
I (3613) Main: Reading hello.txt
E (3617) Main: Failed to open hello.txt
GarMingLi commented 3 years ago

When I type the command: python spiffsgen.py --help error occurred: python: can't open file 'spiffsgen.py': [Errno 2] No such file or directory