Page 2 of 2

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 5:11 pm
by lbernstone
I made a bad assumption that the disk size would be a const...
Finished code at https://github.com/lbernstone/autopart

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 5:22 pm
by RandomInternetGuy
Wait. That edit is pretty important. It went from
The register function uses the chip size written on the disk, so regardless of whether "you" know the real size, it won't go past that boundary.
leading to my discouragement and walking away to (essentially) "That's totally possible - get_real_chip_size() won't fib and and esp_partition_register_external() really will do what we told it to do - and here's a finished version of the idea we've been kicking ground."


If so, that's amazing news and I'll pick the idea back up.

As always, thank you for your help!

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 6:36 pm
by lbernstone
I made a bad assumption that my edit would make it up there before you saw it :)

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 7:55 pm
by RandomInternetGuy
OK, but to confirm (and clearly, I'll have to deploy and test this) you think this is now a reasonable thing to do.

I quite like that it took three of us kicking this idea around to get it to the finish line.

Thank you, everyone!

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 8:50 pm
by lbernstone
Yes, that example sketch can be built on a 4MB device, and then imaged onto a 16MB, and it will use the whole flash.
Projects often take a group, and that's why Ivan gets paid the big bucks :D

Re: Dynamically resizing SPIFFS partition to "largest possible"

Posted: Sun Aug 13, 2023 8:57 pm
by RandomInternetGuy
Awesome. I'll probably start rolling that into my code this week or next. It's not THAT different than what's already there. I'm pretty chuffed that it'll cut our build/distribution matrix substantially.

Appreciate it!