A ROM filing-system for Neotron OS
It's like any other kind of filing system, except the contents are designed to live in Flash memory next to your microcontroller's firmware.
neotron-romfs
- ano_std
library for encoding and decoding ROM FS imagesmkfs
- a CLI application for packing files into a ROM FS imagelsfs
- a CLI application for unpacking files from a ROM FS image
A ROM FS contains a header, and then a number of entries - all concatenated together.
There are no CRCs because it is assumed that the Flash storage is reliable. If this is an issue, feel free to wrap the whole ROM FS with a CRC.
- The 8-byte ASCII string
NeoROMFS
. - The version, as a 4-byte sequence
- v1.0.0 is given as
[0x00, 0x01, 0x00, 0x00]
- Other values are reserved for future use
- v1.0.0 is given as
- The ROM FS size in bytes (including this header), as a 4-byte big-endian
u32
The header is always 24 bytes long.
An entry comprises a header, followed by the contents of the file.
The header is:
- A filename, as a null-padded UTF-8 string which is exactly 14 bytes in length.
- A file size, as a 4-byte big-endian
u32
(not including this header) - A timestamp, as a six byte value:
- The years since 1970 (e.g.
2003
is33
) - The month, zero-indexed (e.g. February is
1
) - The day of the month, zero-indexed (e.g. the 3rd is
2
) - The hour of the day
- The minutes past the hour
- The seconds past the minute
- The years since 1970 (e.g.
The file format is licensed as CC0.
The libraries and binaries each have a licence specified - see their package files for details.