p7os: "main memory reset" missing #7

Open
opened 2020-01-03 16:13:10 +01:00 by Milang · 11 comments

It could be interesting to be able to completely reset the calculator's main memory during a flash.

Maybe a --erase-flash could be added 😃

It could be interesting to be able to completely reset the calculator's main memory during a flash. Maybe a `--erase-flash` could be added :smiley:

Main memory or storage memory? The first one is in RAM, with two backups in the ROM area of the OS (sector-aligned).

Main memory or storage memory? The first one is in RAM, with two backups in the ROM area of the OS (sector-aligned).
Author

Oops, I inverted main memory and storage memory 😕 I speak about resetting storage memory

Oops, I inverted main memory and storage memory :confused: I speak about resetting storage memory
Milang started working 2020-01-03 16:44:49 +01:00
Milang stopped working 2020-01-03 16:45:03 +01:00
14s

I think this is a good idea. However, to do this we need backups that include a copy of an empty storage memory. Such backups should be 4M (or 8M for the Graph 35+E II but I don't think this is on the agenda yet).

A possible way to get that is to flash that standard OS to a calculator, then make a new backup of the full ROM.

Is there backup support in p7? As far as I remember, this is normally done by a protocol 7 command which was removed at some point, sometime around OS 2.05 I think.

Maybe we can write an add-in that implements that command, or any other simple backup protocol? This would help create new backups for all add-in supporting OSes, which should be all interesting OSes after OS 2.05.

I think this is a good idea. However, to do this we need backups that *include* a copy of an empty storage memory. Such backups should be 4M (or 8M for the Graph 35+E II but I don't think this is on the agenda yet). A possible way to get that is to flash that standard OS to a calculator, then make a new backup of the full ROM. Is there backup support in p7? As far as I remember, this is normally done by a protocol 7 command which was removed at some point, sometime around OS 2.05 I think. Maybe we can write an add-in that implements that command, or any other simple backup protocol? This would help create new backups for all add-in supporting OSes, which should be all interesting OSes after OS 2.05.
Owner

The erase option is added to the TODO list :). I think about how to do this, thank to Lephenixnoir for his notes ! Before that I work on p7 send and get and make a better error handling for the streams.

osrecover.sh4 doesn't support backup option so for backup data I think make a new osrecover.sh4 (if I get there), and after implement that on p7os.

So I keep you posted for backup erase option.

The erase option is added to the TODO list :). I think about how to do this, thank to Lephenixnoir for his notes ! Before that I work on p7 send and get and make a better error handling for the streams. osrecover.sh4 doesn't support backup option so for backup data I think make a new osrecover.sh4 (if I get there), and after implement that on p7os. So I keep you posted for backup erase option.
Owner

Tomorrow I will try to erase all main memory (0xA0010000 to 0xA0400000 instead of 0xA0270000) add then flash.

Tomorrow I will try to erase all main memory (0xA0010000 to 0xA0400000 instead of 0xA0270000) add then flash.

osrecover.sh4 doesn’t support backup option so for backup data I think make a new osrecover.sh4 (if I get there), and after implement that on p7os.

I don't think you need to go this far. Writing ROM is complicated stuff because it cannot be done from ROM and so on. But reading it is much easier. In fact, the Graph 35+E II Oses that we have were just copied to filesystem (in several parts) by an add-in. This should be much simpler than writing an updater. ^^

> osrecover.sh4 doesn’t support backup option so for backup data I think make a new osrecover.sh4 (if I get there), and after implement that on p7os. I don't think you need to go this far. Writing ROM is complicated stuff because it cannot be done from ROM and so on. But reading it is much easier. In fact, the Graph 35+E II Oses that we have were just copied to filesystem (in several parts) by an add-in. This should be much simpler than writing an updater. ^^
Owner

Okey, but write a new osrecover.sh4 is always in my plans, for support more stuff

Okey, but write a new osrecover.sh4 is always in my plans, for support more stuff
Owner

p7os flash [os] -u [osrecover.sh4] --erase-flash is worked for me (the erase zone is 0xA0010000 to 0xA027FFFF instead of 0xA026FFFF).

New branch p7os-erase-flash for testing

`p7os flash [os] -u [osrecover.sh4] --erase-flash` is worked for me (the erase zone is 0xA0010000 to 0xA027FFFF instead of 0xA026FFFF). New branch `p7os-erase-flash` for testing
Owner

I just merge dev in master, --erase-flash is normally functional

I just merge dev in master, `--erase-flash` is normally functional

Do you know why erasing just this sector is enough? Is it the filesystem table? Any information there?

Do you know why erasing just this sector is enough? Is it the filesystem table? Any information there?
Owner

Yep, I think that (the FS table), this is just an intuition. But it work. After flashing the calculator say "Optimization stopped erase or continue". If you select erase or continue it does the same (total erase). It's like removing the first sectors from a HDD. ("soft erase")

Yep, I think that (the FS table), this is just an intuition. But it work. After flashing the calculator say "Optimization stopped erase or continue". If you select erase or continue it does the same (total erase). It's like removing the first sectors from a HDD. ("soft erase")
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Total Time Spent: 14 seconds
Milang
14 seconds
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: Lailouezzz/libcasio#7
No description provided.