Ritesh wrote: ↑Sat Aug 03, 2019 11:50 am
StridingDragon wrote: ↑Sat Aug 03, 2019 12:17 am
Has anyone ever tried to write something like a persistent RAM disk for the ESP32?
Our device has 16MB of memory and I would like to set aside some of that as a persitent RAM disk to hold various files that need to be accessed frequently and need to be present even after a soft reset. I don't need full file access functionality—I'll handle all that myself—, just a protected SPI RAM block that is not wiped upon a soft reset and that is excluded/protected from the system memory allocator.
Does anyone have any hints how to approach this on the ESP32?
Hello,
I have one question like why you can't use 16 MB Flash supported module into your project?
Hi
@Ritesh
i think he mean
persistent System but not RAM
technic
StridingDragon wrote: ↑Sat Aug 03, 2019 12:17 am
Has anyone ever tried to write something like a persistent RAM disk for the ESP32?
Our device has 16MB of memory and I would like to set aside some of that as a persitent RAM disk to hold various files that need to be accessed frequently and need to be present even after a soft reset. I don't need full file access functionality—I'll handle all that myself—, just a protected SPI RAM block that is not wiped upon a soft reset and that is excluded/protected from the system memory allocator.
Does anyone have any hints how to approach this on the ESP32?
Hi
The 16MB are the 16 MB of SPI Flash i think.
And you want to make from this 16 MB a persistent RAM disk for the ESP32 ?
+ "to hold various files that need to be accessed frequently and need to be present even after a soft reset."
this is no problem, you could use the SPI Flash as FS System too, you can save on this files, you can use this after a soft reset and so on.
have a look to
storage examples:
-
fopen could usefull for you perhabs
-
FAT FS on external SPI Flash could usefull for you too
- ... many other possibles
i think you need not a
persistent RAM i think you mean a possible way, to save, read, write files or data to the 16MB "Flash"
that you can use after a soft reset further more and does not be deleted..
persistent RAM
is bytewise read, write over CPU Bus
( Variables, Functions, ...)
SPI Flash
is blockwise over I/O
( Files, Data, Save Variables to Flash Disk, Read Variables from Flash Disk ..)
if you want use
persistent RAM on a SPI Flash for read
and write you have to do many hacks in the ESP-IDF,
but it is possible. ( Let me know if you are finnish )
I remember that we can do one way, ( read or write ) from/to SPI Flash as a "RAM" expanded system
for the esp32 but this is an other theme.
best wishes
rudi