marqs85 / ossc

Open Source Scan Converter
http://junkerhq.net/xrgb/index.php/OSSC
GNU General Public License v3.0
469 stars 63 forks source link

Implement userdata export. #73

Closed megari closed 3 years ago

megari commented 3 years ago

A very simple implementation, as we are very short on remaining block RAM. Simply blindly copies the entire userdata area to the SD card. This may subject the SD card to some extra wear, as well as potentially read-disturb some Flash memory pages, but this would require more code.

megari commented 3 years ago

There is still something slightly wrong with the UI (particularly OSD) behavior wrt error paths in userdata export, but now the export-import round trip for settings does seem to work.

megari commented 3 years ago

Fixed an off-by-one bug which caused the initcfg not to be exported.

megari commented 3 years ago

I added two more patches: one fixes a bug in validation of Flash read/write parameters when fully reading/writing the last page on the Flash chip, the other adds -flto to the build flags, yielding an almost 2kB reduction in the size of the resulting firmware binary with a riscv32 gcc 10.2 cross-compiler.