Visible to Intel only — GUID: mwh1416946775988
Ixiasoft
Visible to Intel only — GUID: mwh1416946775988
Ixiasoft
7.8.1. Host-Based File System
The following features and restrictions apply to the host based file system:
- The host-based file system makes the Nios® II C/C++ application project directory and its subdirectories available to the HAL file system on the target hardware.
- The target processor can access any file in the project directory. Be careful not to corrupt project source files.
- The host-based file system only operates while debugging a project. It cannot be used for run sessions.
- Host file data travels between host and target serially through the Intel FPGA download cable, and therefore file access time is relatively slow. Depending on your host and target system configurations, it can take several milliseconds per call to the host. For higher performance, use buffered I/O function such as fread() and fwrite(), and increase the buffer size for large files.
You configure the host-based file system using the Nios® II BSP Editor. The host-based file system has one setting: the mount point, which specifies the mount point within the HAL file system. For example, if you name the mount point /mnt/host and the project directory on you host computer is /software/project1, in a HAL-based program, the following code opens the file /software/project1/datafile.dat.:
fopen("/mnt/host/datafile.dat", "r");