User guide
Nios II IDE Help System
94
Zip Read-Only File System
The zip read-only file system provides access to a simple file system stored in flash memory.
Your program accesses the Zip file system using the ANSI C standard library I/O functions,
such as fopen() and fread(). The zip read-only file system is a software component
which
you add to your system library.
The zip read-only file system requires an uncompressed .zip file that contains all of the files
for the zip file system. This zip file must exist in the Nios II system library project.
Note: You can drag-and-drop a zip file from the host file system onto your system library
project in the Nios II C/C++ Projects view to automatically import the zip file into the
Nios II system library project. Alternatively, on the File menu, click Import..., expand
General, then use File System (not Zip File) to import the .zip file (not the contents of
the zip file) to your system library.
You configure the zip read-only file system using the Software Components dialog box. The
zip read-only file system has the following settings:
Flash memory device—Displays a list of the available target flash devices and allows
you to select a device to program.
Offset—Specifies an offset into the flash memory, indicating where to write the zip file
system contents.
Mount-point—Specifies the mount point within the hardware abstraction layer (HAL)
file system. For example, if you name the mount point /mnt/zipfs, the code
fopen("/mnt/zipfs/foo", "r"); in a HAL-based program opens the file foo within
the zip file.
Zip file (must be uncompressed)— Specifies the zip file.
For your program to access files in the zip file system, you must write the project to flash
memory using the flash programmer
. As part of the project build process, the Nios II IDE
creates a .flash file that includes the data for the zip file system, and stores it in the Release
or Debug configuration directory of your project.
Related Nios II IDE Help Topics
Choosing and Configuring Middleware Software Components
Software Components Dialog Box (System Library Properties Page)
Related Topics on the Web
Nios II Flash Programmer User Guide at
www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf