I’ve been messing around with some functions that write to the file system and have run out of memory. I’ve been trying to work out if there is some option available to extend the available memory in ‘/’, and am a little lost.
This I’ve read:
-
This doc on how OTA function requires memory split so that make sense.
-
The How-To on FS but I don’t really understand how the available 4M flash memory is laid out/used.
Questions/Unknowns:
-
I’ve seen RAM which gets use during device operation, again I don’t understand how this is allocated or where its defined.
-
When I build my app with verbose logging I see the commands of interest:
Generating esp32.project.ld
LD /home/Code/mongoose/build/objs/mongoose.elf
esptool.py v3.0
App size: 1074192 of 1572864 (68%)
- So I guess this tells me I have some room in the app area
MKFS /usr/local/bin/mkspiffs8 262144 {bs:4096,ps:256,es:4096} /home/Code/mongoose/build/objs/fs -> /home/Code/mongoose/build/objs/fw_temp/fs.img
FS params: size=262144, bs=4096, ps=256, es=4096
Adding abc.dif
.
. (lots of stuff)
.
Adding ca.pem: 31787\
FS stats : space total=233681, used=172939, free=60742
- And this tells me the place I write stuff to is mostly used up already.
Summary:
I guess I want to know if there is any “free” memory that I can somehow add to this MKFS command that is run during build so I can have more memory available in ‘/’