Persistent storage stuff #4

Open
opened 2021-07-24 00:09:59 +00:00 by sys64738 · 4 comments
Owner

This may be useful for remembering which mode was enabled, and maybe some per-mode settings (eg. SUMP overclock enable/disable, USB-UART hardware flow control enable/disable, tempsensor I2C emul address, ...)

This should be saved to flash in some place, and the format in which it is stored should be generic/extensible in some way (inb4 RIFF).

Thoughts?

This may be useful for remembering which mode was enabled, and maybe some per-mode settings (eg. SUMP overclock enable/disable, USB-UART hardware flow control enable/disable, tempsensor I2C emul address, ...) This should be saved to flash in some place, and the format in which it is stored should be generic/extensible in some way (inb4 RIFF). Thoughts?
Collaborator

what if plaintext lol
uboot uEnv style :p
one config option per line, have some robust parsing code that can deal with potential garbage / no null terminator / etc

what if plaintext lol uboot uEnv style :p one config option per line, have some robust parsing code that can deal with potential garbage / no null terminator / etc
Author
Owner

sure, but consider:

i dont want to do string parsing in C

sure, but consider: i dont want to do string parsing in C
Collaborator

🦀 time

🦀 time
Author
Owner

The base for this is now implemented: storage branch. Also docs: 1, 2

One thing that is a bit annoying is that the saving and loading of mode-specific variables is very ad-hoc and ugly, and could be done much better. So I guess some sort of wrapper API should be invented for this.

Additionally, the use-XIP-cache-as-temp-RAM stuff seems to lock up, so right now the code is statically reserving 4k of RAM for all eternity, only used when saving. Not a big fan of the situation tbh :/

The base for this is now implemented: [`storage` branch](https://git.lain.faith/sys64738/DragonProbe/src/branch/storage). Also docs: [1](https://git.lain.faith/sys64738/DragonProbe/wiki/Persistent-storage), [2](https://git.lain.faith/sys64738/DragonProbe/wiki/USB-config-%26-command-protocol#persistent-storage-commands) One thing that is a bit annoying is that the saving and loading of mode-specific variables is very ad-hoc and ugly, and could be done much better. So I guess some sort of wrapper API should be invented for this. Additionally, the use-XIP-cache-as-temp-RAM stuff seems to lock up, so right now the code is statically reserving 4k of RAM for all eternity, only used when saving. Not a big fan of the situation tbh :/
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sys64738/DragonProbe#4
No description provided.