Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp-WEB-Tools and SPIFFS #445

Open
herve-tourrel opened this issue Dec 1, 2023 · 10 comments
Open

Esp-WEB-Tools and SPIFFS #445

herve-tourrel opened this issue Dec 1, 2023 · 10 comments

Comments

@herve-tourrel
Copy link

herve-tourrel commented Dec 1, 2023

Good morning,
I cannot flash a spiffs file containing a website with ESP-Web-Tools. The firmware part flashes correctly but not the SPIFFS file. I have to use the Arduino IDE or VSCode and PlateformIO.
Here is my manifest:

{
  "name": "ESPHome",
  "builds": [
    {
      "chipFamily": "ESP32",
      "improv": false,
      "parts": [
        { "path": "bootloader.bin", "offset": 4096 },
        { "path": "partitions.bin", "offset": 32768 },
        { "path": "boot_app0.bin", "offset": 57344 },
        { "path": "firmware.bin", "offset": 65536 },
	{ "path": "spiffs.bin", "offset": 2686976}
      ]
    },
    {
      "chipFamily": "ESP8266",
      "parts": [
        { "path": "esp8266.bin", "offset": 0 }
      ]
    }
  ]
}

and here is what the Arduino IDE does:

For the spiffs part : 

Serial port COM17
Connecting.....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b4:8a:0a:63:70:38
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00290000 to 0x003effff...
Compressed 1441792 bytes to 7020...
Writing at 0x00290000... (100 %)
Wrote 1441792 bytes (7020 compressed) at 0x00290000 in 8.2 seconds (effective 1414.2 kbit/s)...
Hash of data verified.
@Jason2866
Copy link
Contributor

A better approach is to flash a combined image. Just one file. Use esptool merge to combine the needed images.

@herve-tourrel
Copy link
Author

Thanks for the answer, I will try to make a single file with esptool.

@rainerfritz
Copy link

Does your partition table also have the spiffs partition defined, corresponding to the offset?

@herve-tourrel
Copy link
Author

Yes, but my problem is solved with Jason2866's method and the use of flash_download_tool_3.9.5 which allows you to create a combined image graphically.

@gism
Copy link

gism commented Jan 3, 2024

I had the same issue with latest version (9.4.3)
Also, I've seen that this version overwrites SPIFFS even if bin and addresses are smaller and don't reach SPIFFS addresses.
For my application I want to flash application and keep SPIFFS with no update.
Now i'm using version 3.4.2. I can write SPIFFS and application with different buttons. thanks

@AllanOricil
Copy link

@gism can you show me how you did it? I have a site which I want to upload to my esp32 from my website. I'm using platform.io to build the firmware.

@herve-tourrel
Copy link
Author

herve-tourrel commented Jun 30, 2024 via email

@AllanOricil
Copy link

AllanOricil commented Jul 2, 2024

I was able to do it. If anyone is interested, here is how you can do it

https://github.com/allanoricil/esp32-mfa-authenticator

Open scripts/build.sh

@gism
Copy link

gism commented Jul 27, 2024

@AllanOricil what I did is to combine all binaries boot, bootloader, partitions, app, spiffs in a single file using ESP32 flash download tools.

To locate all bin and known addresses to place easiest is to check flashing command on your regular ide. Or partitions csv.

Then in manifest for Esp-WEB-Tools I'm only flashing this combined binary.
That was a quick workaround, not sure if finally is fixed or if there is better solution

@AllanOricil
Copy link

@AllanOricil what I did is to combine all binaries boot, bootloader, partitions, app, spiffs in a single file using ESP32 flash download tools.

To locate all bin and known addresses to place easiest is to check flashing command on your regular ide. Or partitions csv.

Then in manifest for Esp-WEB-Tools I'm only flashing this combined binary. That was a quick workaround, not sure if finally is fixed or if there is better solution

@gism I was able to do the same thing. Thanks for the reply, anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants