Specifications

Location File Name
components/altera_hal/HAL/src/ alt_log_printf.c
components/altera_nios2/HAL/src/ alt_log_macro.S
Note: All file locations are relative to <Nios II EDS install path>.
These files implement the logging options listed in the "Altera Logging Options and Option Modifiers"
table (Table 6-3). They also serve as examples of logging usage.
Table 6-6: HAL Example Files for Altera Logging
Location File Name
components/altera_avalon_jtag_uart/HAL/src/ altera_avalon_jtag_uart.c
components/altera_avalon_timer/HAL/src/ altera_avalon_timer_sc.c
components/altera_hal/HAL/src/ alt_exit.c
components/altera_hal/HAL/src/ alt_main.c
components/altera_hal/HAL/src/ alt_write.c
components/altera_nios2/HAL/src/ crt0.S
Note: All file locations are relative to <Nios II EDS install path>.
Using File Subsystems
The HAL generic device model for file subsystems allows access to data stored in an associated storage
device using the C standard library file I/O functions. For example, the Altera read-only zip file system
provides read-only access to a file system stored in flash memory.
A file subsystem is responsible for managing all file I/O access beneath a given mount point. For example,
if a file subsystem is registered with the mount point /mnt/rozipfs, all file access beneath this directory,
such as fopen("/mnt/rozipfs/myfile", "r"), is directed to that file subsystem.
As with character mode devices, you can manipulate files in a file subsystem using the C file I/O functions
defined in file.h, such as fopen() and fread().
For more information about the use of file I/O functions, refer to the newlib C library documentation
installed with the Nios II EDS. On the Windows Start menu, click Programs > Altera > Nios II <version>
> Nios II EDS <version> Documentation.
Host-Based File System
The host-based file system enables programs executing on a target board to read and write files stored on
the host computer. The Nios II SBT for Eclipse transmits file data over the Altera download cable. Your
program accesses the host based file system using the ANSI C standard library I/O functions, such as
fopen() and fread(). The host-based file system is a software package which you add to your BSP.
NII5V2
2015.05.14
Using File Subsystems
6-13
Developing Programs Using the Hardware Abstraction Layer
Altera Corporation
Send Feedback