In case there are more than one storage device in the system, changing between them is done by executing command ‘mount’. For example, in some systems, a storage device located in the RAM might exist for easier exchange of operational data between various programs. Changing from the current drive to that one could be done as in the example below:
Now the current drive has become RAM:
This, however, is only possible if the specified device is already initialised with a file system on it. In the particular example of a RAM drive, the information on it disappears every time when the system restarts, so it is likely that there won’t be any file system at the time of first attempted access.
The system will generate an error when the user attempts to access a device that doesn’t exist or has no file system.
The output in such case when the RAM drive is not initialised will actually be like this:
>>> drive error 13: no valid file system on the device
Note that after this error the system is ‘nowhere’. There is no active drive listed in the prompt. In order to gain access to files again, the user will need to mount some valid device, or initialise one. Rittle operates normally even being ‘nowhere’, hardware-independent commands can be executed from the console, RIDE is also accessible, but no file operations are possible.
We can return back to IFS like this:
But in the example above we actually wanted to access the RAM drive, so instead of remounting IFS, we will use the INIT command to create a file system on the RAM drive and prepare it for normal work:
>>> initialised size 1028096 bytes
The RAM drive is now initialised and successfully mounted. In case there is already a file system in a drive that the user is trying to initialise, the command will display a warning and will expect a manual confirmation before performing the operation.
Rittle currently supports the following storage devices:
ifs: Internal File Storage, must be
always present in every Rittle system
ram: Optional data drive based in RAM
sd1: Optional external SD card on ports 3 (CS#), 4 (SCLK), 5 (MISO), 6 (MOSI)
sd2: Optional external SD card on ports 2 (CS#), 4 (SCLK), 5 (MISO), 6 (MOSI)
When initialising a new file system, Rittle uses FAT or FAT32, automatically selected depending on the size of the storage drive.
In the command line, the ‘mount’ command can omitted. Thus, for example, typing just ‘sd1:’ in the console will have the same effect as ‘mount sd1:’. This is valid for all file devices.