Working version

Dependents:   PUB_RA8875_Bitmap

This version of the FlashFileSystem is directly derived from a library of the same name by Adam Green. See Adam's original at Flash File System.

Important in the use of this library is the generation of the embedded resource. For this there is a companion tool - rofs.exe. Adam provided a link to the source in github. I used that but found I wanted a few more features, so I made a large number of changes.

ROFS.exe Features

  • Bidirectional:
    • Create flash file system from folder of resources
    • Extract resources from flash file system [.h/.bin]
  • w/reduced warnings
  • faster file system building
  • more internal documentation in the generated .h file
  • additional help information added

Windows EXE

  • Contact me by Private Email for a copy - the mbed site is not letting me upload it as a zip.
Committer:
WiredHome
Date:
Sat Jul 29 12:45:09 2017 +0000
Revision:
0:6339b3e34014
FlashFileSystem - Read-only, but super fast. Requires external tool to prepare the data.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WiredHome 0:6339b3e34014 1 /* Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/)
WiredHome 0:6339b3e34014 2
WiredHome 0:6339b3e34014 3 Licensed under the Apache License, Version 2.0 (the "License");
WiredHome 0:6339b3e34014 4 you may not use this file except in compliance with the License.
WiredHome 0:6339b3e34014 5 You may obtain a copy of the License at
WiredHome 0:6339b3e34014 6
WiredHome 0:6339b3e34014 7 http://www.apache.org/licenses/LICENSE-2.0
WiredHome 0:6339b3e34014 8
WiredHome 0:6339b3e34014 9 Unless required by applicable law or agreed to in writing, software
WiredHome 0:6339b3e34014 10 distributed under the License is distributed on an "AS IS" BASIS,
WiredHome 0:6339b3e34014 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WiredHome 0:6339b3e34014 12 See the License for the specific language governing permissions and
WiredHome 0:6339b3e34014 13 limitations under the License.
WiredHome 0:6339b3e34014 14 */
WiredHome 0:6339b3e34014 15 /* Specifies constants and structures used within the FLASH File System. The
WiredHome 0:6339b3e34014 16 header is used by both the runtime and the tool which builds the image on
WiredHome 0:6339b3e34014 17 the PC.
WiredHome 0:6339b3e34014 18 */
WiredHome 0:6339b3e34014 19 #ifndef _FFSFORMAT_H_
WiredHome 0:6339b3e34014 20 #define _FFSFORMAT_H_
WiredHome 0:6339b3e34014 21
WiredHome 0:6339b3e34014 22
WiredHome 0:6339b3e34014 23 /* The signature to be placed in SFileSystemHeader::FileSystemSignature.
WiredHome 0:6339b3e34014 24 Only the first 8 bytes are used and the NULL terminator discarded. */
WiredHome 0:6339b3e34014 25 #define FILE_SYSTEM_SIGNATURE "FFileSys"
WiredHome 0:6339b3e34014 26
WiredHome 0:6339b3e34014 27 /* Header stored at the beginning of the file system image. */
WiredHome 0:6339b3e34014 28 typedef struct _SFileSystemHeader
WiredHome 0:6339b3e34014 29 {
WiredHome 0:6339b3e34014 30 /* Signature should be set to FILE_SYSTEM_SIGNATURE. */
WiredHome 0:6339b3e34014 31 char FileSystemSignature[8];
WiredHome 0:6339b3e34014 32 /* Number of entries in this file system image. */
WiredHome 0:6339b3e34014 33 unsigned int FileCount;
WiredHome 0:6339b3e34014 34 /* The SFileSystemEntry[SFileSystemHeader::FileCount] array will start here.
WiredHome 0:6339b3e34014 35 These entries are to be sorted so that a binary search can be performed
WiredHome 0:6339b3e34014 36 at file open time. */
WiredHome 0:6339b3e34014 37 } SFileSystemHeader;
WiredHome 0:6339b3e34014 38
WiredHome 0:6339b3e34014 39 /* Information about each file added to the file system image. */
WiredHome 0:6339b3e34014 40 typedef struct _SFileSystemEntry
WiredHome 0:6339b3e34014 41 {
WiredHome 0:6339b3e34014 42 /* The 2 following offsets are relative to the beginning of the file
WiredHome 0:6339b3e34014 43 image. */
WiredHome 0:6339b3e34014 44 unsigned int FilenameOffset;
WiredHome 0:6339b3e34014 45 unsigned int FileBinaryOffset;
WiredHome 0:6339b3e34014 46 unsigned int FileBinarySize;
WiredHome 0:6339b3e34014 47 } SFileSystemEntry;
WiredHome 0:6339b3e34014 48
WiredHome 0:6339b3e34014 49
WiredHome 0:6339b3e34014 50 #endif /* _FFSFORMAT_H_ */