How can I create an index of file locations (addresses) in EEPROM where my files were stored (written)?
It should be something like starting from index (location) 0, and going on for the length of the object/struct, Then once you know that length, you can add an empty byte, ad start the next file. BUT you need to know the address of the next file, and it's length(?) in order to read it, or anything else...
[Address]
start stop
0 238 a struct taking up 239 bytes
239 239 a blank byte to separate
240 261 a struct taking up 21 bytes
262 262 a blank byte to separate
263 263 a 1 byte primitive object
[...]
..and we haven't even talked about storing the index in the EEPROM itself...
Is there a flow/set of steps/code to determine the size of objects (primitives & structs), such that lots of data/structs can be stored/accessed on a single chip?
then the struct you store contains first it's size on a given number of bytes that is known (say one byte if the length is always less than 255) and then the variable size payload.
EEPROM would look like 43ABC5DEFGH1I6JKLMNO
resizing an entry will not be fun though
you could also go with "fixed size" struct and pad with 0 the unused data
In other storage mediums, a character for delimiting is key when troubleshooting. Should that be a "0"? Probably not... A high ASCII char stands out more.
Use Preferences.h instead. It is a library bundled in the Arduino core, and it uses Key/Value pairs and manages the addresses. It also does wear leveling and NVS memory management.