Dynamically resizing SPIFFS partition to "largest possible"

lbernstone
Posts: 817
Joined: Mon Jul 22, 2019 3:20 pm

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby lbernstone » Sun Aug 13, 2023 5:11 pm

I made a bad assumption that the disk size would be a const...
Finished code at https://github.com/lbernstone/autopart

RandomInternetGuy
Posts: 48
Joined: Fri Aug 11, 2023 4:56 am

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby RandomInternetGuy » Sun Aug 13, 2023 5:22 pm

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!

lbernstone
Posts: 817
Joined: Mon Jul 22, 2019 3:20 pm

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby lbernstone » Sun Aug 13, 2023 6:36 pm

I made a bad assumption that my edit would make it up there before you saw it :)

RandomInternetGuy
Posts: 48
Joined: Fri Aug 11, 2023 4:56 am

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby RandomInternetGuy » Sun Aug 13, 2023 7:55 pm

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!

lbernstone
Posts: 817
Joined: Mon Jul 22, 2019 3:20 pm

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby lbernstone » Sun Aug 13, 2023 8:50 pm

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

RandomInternetGuy
Posts: 48
Joined: Fri Aug 11, 2023 4:56 am

Re: Dynamically resizing SPIFFS partition to "largest possible"

Postby RandomInternetGuy » Sun Aug 13, 2023 8:57 pm

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!

Who is online

Users browsing this forum: Bing [Bot] and 35 guests