where to download mkspiffs binary?

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

where to download mkspiffs binary?

Postby chromebin » Wed Jun 06, 2018 7:31 pm

I am trying to create a precompiled spiffs partition. https://esp-idf.readthedocs.io/en/lates ... piffs.html says "Host-Side tools for creating SPIFS partition images exist and one such tool is mkspiffs". However the 'mkspiffs' doesn't work out of the box, mkspiffs isn't included in the SDK... :(

So someone, please provide a link where I can download mkspiffs, THE BINARY?

Note I'm in a Windows msys32 environment!

Edit to include a relevant keyword string for google: 'make makefs' results in "make: *** No rule to make target 'makefs'".
Last edited by chromebin on Wed Jun 06, 2018 7:54 pm, edited 4 times in total.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: where to download mkspiffs?

Postby WiFive » Wed Jun 06, 2018 7:37 pm


chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: where to download mkspiffs?

Postby chromebin » Wed Jun 06, 2018 7:48 pm

I edited my post to more clearly state I request the mkspiffs binary (for MSYS32 Windows).

I ask this question because it is of little use to send someone to github, make them install a Windows (cross?) C-compiler, manage paths, deal with windows-linux/msys32/path/compiler issues, search google and STILL have a significant chance it will NOT work.

Did I mention the mixed linux-windows environment that is msys32? So it's easy to say "just compile", but in practice that means there's quite a lot of pain, and worst of all, no guarantee of success. At best it's a time-sink :)

So Windows+MSYS32 is an excellent motive to include it in the SDK.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: where to download mkspiffs?

Postby fly135 » Wed Jun 06, 2018 9:29 pm

chromebin wrote:I edited my post to more clearly state I request the mkspiffs binary (for MSYS32 Windows).

I ask this question because it is of little use to send someone to github, make them install a Windows (cross?) C-compiler, manage paths, deal with windows-linux/msys32/path/compiler issues, search google and STILL have a significant chance it will NOT work.
Looks like there's an executable binary to me.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: where to download mkspiffs binary?

Postby ESP_igrr » Thu Jun 07, 2018 2:35 am

Specifically look for mkspiffs-X.Y.Z-esp-idf-win32.zip download on the page linked by fly135. I'm not including an actual link here because newer release may come out, but the link here would point to outdated version.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: where to download mkspiffs binary?

Postby ESP_igrr » Thu Jun 07, 2018 2:40 am

One more note: if 'makefs' comes from this project: https://github.com/loboris/ESP32_spiffs ... jbuild#L18, then please be advised, that project uses its own copies of spiffs and mkspiffs. They may have differences from copies shipped in esp-idf and github.com/igrr/mkspiffs.

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: where to download mkspiffs binary?

Postby chromebin » Thu Jun 07, 2018 11:40 am

ESP_igrr wrote:Specifically look for mkspiffs-X.Y.Z-esp-idf-win32.zip download on the page linked by fly135. I'm not including an actual link here because newer release may come out, but the link here would point to outdated version.
Thank you so much for pointing this out. I wasn't familiar with github having "releases".

Note that fly135 must have removed the link (no longer found one), so I repeat the one I found: https://github.com/igrr/mkspiffs/releases

Now that I have a mkspiffs.exe how do I use it?
- put it in "C:\msys32\mingw32\bin"
- from the usual project folder execute: "mkspiffs -c ./main/spiffs_image -b 4096 -p 256 -s 0x100000 build/spiffs.bin"
That puts a spiffs.bin in your build folder. Now make as usual I presume, as my project isn't currently compiling I'll update this post once I figured it out.

Would be nice to have mkspiffs run automatically on a make, as a component though.

PS That's one horribly long list, with ~40 releases (instead of having one maybe two binaries that link to a (hypothetical) platform adapter for simple command-line apps)! How do you manage?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: where to download mkspiffs binary?

Postby ESP_igrr » Thu Jun 07, 2018 3:41 pm

chromebin wrote: PS That's one horribly long list, with ~40 releases (instead of having one maybe two binaries that link to a (hypothetical) platform adapter for simple command-line apps)! How do you manage?
Different platforms aside, the reason why mkspiffs has to be compiled separately for each SPIFFS configuration is that some parts of SPIFFS configuration happen at compile time. Hence, different configuration => different binaries. This is explained here: https://github.com/igrr/mkspiffs#spiffs-configuration

(One could conceive a scheme where different SPIFFS configurations would be compiled into shared libraries and then at run time loaded by common console application depending on the command line arguments. Maybe, some day...)

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: where to download mkspiffs binary?

Postby chromebin » Thu Jun 07, 2018 6:00 pm

ESP_igrr wrote: Different platforms aside, the reason why mkspiffs has to be compiled separately for each SPIFFS configuration is that some parts of SPIFFS configuration happen at compile time. Hence, different configuration => different binaries. This is explained here: https://github.com/igrr/mkspiffs#spiffs-configuration
The values in spiffs_config.h seem to correspond to the defaults as found in menuconfig. So I take your advise to be: "stay with the menuconfig defaults!", including the exclamation mark :)

Who is online

Users browsing this forum: No registered users and 119 guests