Arrives in a flash.
Something missing from RISC OS, which is increasingly apparent with support for them on modern devices on which the operating system can be run (or could be theoretically run if it was ported), is a filing system and driver for MMC/SD cards, allowing them to be accessed and used when inserted in the MicroSD card on hardware such as the BeagleBoard, in much the same way as any other storage media are accessed, like a hard or floppy disk or a CD or DVD ROM.
MMC/SD cards can, of course, be read from or written to when inserted in a card reader plugged into a USB socket, but that’s much less convenient – especially considering (for example) that the card from which RISC OS is booted on current modern platforms will be in the SD card slot. With RISC OS taking up only a few megabytes, and the card almost certainly having considerably more space available, that’s either wasted space, or space which can only be made use of in an inconvenient way.
Until now, that is.
Ben Avison, of RISC OS Open Ltd and Piccolo Systems, has released a general purpose MMC/SD filing system for RISC OS, which includes:
- SDIODriver: The driver for SDHCI controllers.
- SDFS: a FileCore filing system that uses SDIODriver to access data stored on a wide range of memory cards (see below).
- SDCMOS: A mechanism by which configuration changes are preserved. This works with recent bootloader scripts to ensure CMOS settings persist across reboots, even for users without EEPROM carrier boards, and without requiring the boot SD card to be left in the slot at all times.
- OMAP3 HAL: Adds hardware-specific declarations and support routines to enable SDIODriver to drive the main SD slot on popular boards.
The types of memory card supported include MMC, MMCplus, RS-MMC, MMCmobile, SD, SDHC, SDXC, MiniSD, MicroSD and MiscroSDHC, all with capacities of up to a maximum of 256GB. Access speeds can vary according to the type of card used, but speeds of up to 14.5MB/s have been measured with some types of card on BeagleBoards.
As well as the most obvious and important benefit of this software – the ability to access and use the memory card – the development work has also benefited RISC OS in other ways, having led to changes, bug fixes and improvements in other areas:
- FileCore has seen many changes and improvements, including faster mounting of media.
- DOSFS has seen a number tweaks and fixes, including allowing construction of bootable DOS-formatted media.
- HForm now supports formatting SD cards, and many other bug fixes.
- SyncLib, a new library of architecture-independent synchronisation primitives.
- SDFSFiler, a desktop front-end to the SD filing system.
Another feature of the software – a benefit for those who like their flashy lights – is that when data is read from or written to the SD card, there is now a visual indication on those boards that make this possible.
The most obvious example is the BeagleBoard, which sports a number of LEDs – two of which are positioned over the MicroSD card slot. These are quite close together, which means it’s easy to miss which one was flashed, so one is flashed when data is read from the card and both are flashed when data is written, making that operation a little more visually obvious. The IGEPv2 board, on the other hand, has a bi-colour LED, and the approach adopted on that card is therefore to flash it green when data is read from the card, and red when it is written – in this case, the two distinct colours are more obvious and easy to distinguish.
Considered for the moment a beta release, the software will form part of the OMAP3 development ROM build – RISC OS 5.19 currently – which can be downloaded from RISC OS Open Ltd’s downloads page, providing native SD card support on the BeagleBoard and BeagleBoard-xM, and (both untested) on the Embest DevKit8000 and the ISEE IGEPv2. The software’s ongoing stability will be one of the deciding factors of it going into a 5.20 ‘stable release’ of RISC OS. The source code, meanwhile, will be published via the RISC OS Open Ltd CVS repository under an open source licence thanks to an agreement signed between them and Piccolo Systems.
Issues that have been found with (or as a result of) the software in its beta form include problems when Reporter (a program designed to aid developing and debugging Wimp software) is started at boot, performance issues (notably when redrawing filer windows set to display ‘full info’), and odd time stamping of files written to the card. The first two of these have since been addressed, with the root cause of the odd time stamping having been identified, but yet to be dealt with because the problem lies in DOSFS (and, indirectly, the C library) and the way in which it converts between RISC OS time and the way the time is stored on FAT formatted media. (Time stamps on cards that are FileCore formatted shouldn’t be a problem – but the SD card used to boot into RISC OS in the first place needs to be FAT formatted in order for the hardware to be able to read the files that actually perform that task.)