Skip to content

Allow Filesystem update via ESP8266HTTPUpdateServer#3732

Merged
d-a-v merged 34 commits into
esp8266:masterfrom
caverna:spiffs-update
Sep 20, 2019
Merged

Allow Filesystem update via ESP8266HTTPUpdateServer#3732
d-a-v merged 34 commits into
esp8266:masterfrom
caverna:spiffs-update

Conversation

@caverna

@caverna caverna commented Oct 17, 2017

Copy link
Copy Markdown
Contributor

This is a fix for #3234 from @sandeen
The original description is:

This adds capability to update the SPIFFS image via the same mechanism as firmware in the ESP8266HTTPUpdateServer.

It does not provide any dependency or linkage between firmware and spiffs image updating; they are each taken on their own, each followed by a reboot.

(I wrote this before seeing the other PR #2701 for similar functionality; I like this a bit better, because it uses the available SPIFFS size, and does not hide magic numbers (U_SPIFFS) in the html...)

(It also cleans up a stray \n from commit ace0622)

We'd really like to see this functionality in the library for the OpenEVSE wifi project

This is my first try at this, mostly cribbing from the ESP8266httpUpdate version of the updater - happy to fix up anything as needed.

Thanks,
-Eric

sandeen and others added 4 commits May 11, 2017 16:50
This adds capability to update the SPIFFS image via
the same mechansism as firmware in the 
ESP8266HTTPUpdateServer.

It does not provide any dependency or linkage between
firmware and spiffs image updating; they are each taken
on their own, each followed by a reboot.

(I wrote this before seeing the other PR for similar
functionality; I like this a bit better, becaue it uses
the available SPIFFS size, and does not hide magic numbers
(U_SPIFFS) in the html...)

(It also cleans up a stray \n from commit ace0622)
# Conflicts:
#	libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.cpp
@caverna

caverna commented Oct 18, 2017

Copy link
Copy Markdown
Contributor Author

I'm using this feature for a while and it works great!

@caverna

caverna commented Oct 21, 2017

Copy link
Copy Markdown
Contributor Author

I think it deserves a little more explanation here...
I don't use ArduinoIDE, in fact I do use VisualStudio together to VMicro addon http://www.visualmicro.com/ (because I'm a C# programmer and I don't want to be switching IDEs).
From this addon, I'm able to generate both sketch and SPIFFS easily.
The original ESP8266HTTPUpdateServer class works fine for sketch binary, but I hadn't no other way to push SPIFF besides the serial (and I was limited to use only 256KB sketch).
That's why this PR is so important to me, because I'm free to use the whole 1MB of ESP (and I'm pretty sure that, if I upgrade it to a 4MB flash, it will work flawless)

@caverna

caverna commented Nov 5, 2017

Copy link
Copy Markdown
Contributor Author

@devyte , would you mind to look into this PR?

@caverna

caverna commented Dec 21, 2017

Copy link
Copy Markdown
Contributor Author

Hi @igrr
Would you mind to look into this PR?

@caverna

caverna commented Feb 15, 2018

Copy link
Copy Markdown
Contributor Author

Just for curiosity, does this PR have no importance at all?

@devyte

devyte commented Feb 16, 2018

Copy link
Copy Markdown
Collaborator

@caverna it's important, I may include this in my own application. We're just prioritizing stability for 2.4.1 and likely 2.5.0 as well, which means complex enhancements like this one get pushed back a little. Please be patient, we'll get there.

@caverna

caverna commented Sep 12, 2019

Copy link
Copy Markdown
Contributor Author

Ok, the library has changed a lot...
How can I get now the start and the size of the SPIFF?

@d-a-v

d-a-v commented Sep 12, 2019

Copy link
Copy Markdown
Collaborator

It was _SPIFFS_start, it is now _FS_start (and _end, _page and _block, #5511)

@caverna

caverna commented Sep 17, 2019

Copy link
Copy Markdown
Contributor Author

Hi @d-a-v !
I did check Travis results but I have no clue how to fix it (error messages doesn't help).

@devyte

devyte commented Sep 17, 2019

Copy link
Copy Markdown
Collaborator

Symbols _Fs_end and _Fs_start aren't defined.

@d-a-v

d-a-v commented Sep 17, 2019

Copy link
Copy Markdown
Collaborator

They are declared in flash_hal.h

@earlephilhower earlephilhower left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea, thanks for updating it to the new core!

Comment thread libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h Outdated
@caverna

caverna commented Sep 17, 2019

Copy link
Copy Markdown
Contributor Author

@earlephilhower sorry, I typed your user wrong in comments... :-)

@earlephilhower earlephilhower left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, thanks.

@caverna

caverna commented Sep 17, 2019

Copy link
Copy Markdown
Contributor Author

@d-a-v please let me know if it's necessary to rename internal variables and/or html parameter name.

@d-a-v

d-a-v commented Sep 17, 2019

Copy link
Copy Markdown
Collaborator

@caverna Yes it seems @earlephilhower is right and names could be more generic
"spiffs" -> "filesystem" in ESP8266HTTPUpdateServer-impl.h around L30 and L95,

@d-a-v d-a-v removed the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Sep 17, 2019
@d-a-v d-a-v changed the title Allow SPIFFS update via ESP8266HTTPUpdateServer Allow Filesystem update via ESP8266HTTPUpdateServer Sep 17, 2019
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

Successfully merging this pull request may close these issues.

6 participants