Modules | |
Functions | |
Definitions | |
Data Structures | |
The embedded file system FSYS is useful for configuration file or application hex file up- and downloads. Built-in FLASH-read, -write and -sector erase function make it possible to read and write the file directly to/from the specified FLASH sector. The embedded file system consists of a two level directory structure. The root directory contains subdirectories only, each subdirectory occupies exactly one file. Because the Flash Memory can be erased on a sector basis only, each directory with write access MUST be mapped to a single or multiple unique sector(s). Overlapping of sectors with write access is not possible! No such restrictions apply to directories with read-only access.
A file is described with the direntry_type
structure direntry_type dir_1 = { dirname, filename, maxlength, access, filetype,address };
Members
Example: The following example defines a directory ModuleConfig which contains file config.txt - the Module Configuration File. Read and Write access is allowed, the file type is ASCII. Also defined is the application boot file in directory Application. The file name displayed is app_bootfile.hex. Its type is Intel-Hex, read and write access is possible. The application boot file starts at Flash address 0x00000 and a maximum length of 64K bytes (0x10000) is allowed. A third directory is created, which also contains the Module Configuration File, but allows to read this file only.
These files now can be added to a FTP server directory structure:
The admin account has a full read/write permission to ModuleConfig and Application file; guest and anonymous will only see an unchangeable ModuleConfig file.