Specifications

Altera Logging Functions................................................................................................................6-7
Using File Subsystems...............................................................................................................................6-13
Host-Based File System.................................................................................................................6-13
Using Timer Devices.................................................................................................................................6-14
System Clock Driver......................................................................................................................6-14
Alarms............................................................................................................................................. 6-15
Timestamp Driver..........................................................................................................................6-16
Using Flash Devices...................................................................................................................................6-17
Simple Flash Access.......................................................................................................................6-18
Block Erasure or Corruption........................................................................................................6-18
Fine-Grained Flash Access........................................................................................................... 6-19
Using DMA Devices..................................................................................................................................6-23
DMA Transmit Channels.............................................................................................................6-24
DMA Receive Channels................................................................................................................6-24
Using Interrupt Controllers..................................................................................................................... 6-27
Reducing Code Footprint in Embedded Systems..................................................................................6-27
Enable Compiler Optimizations..................................................................................................6-28
Use Reduced Device Drivers........................................................................................................6-28
Reduce the File Descriptor Pool.................................................................................................. 6-28
Use /dev/null...................................................................................................................................6-28
Use a Smaller File I/O Library......................................................................................................6-29
Use the Lightweight Device Driver API..................................................................................... 6-31
Use the Minimal Character-Mode API...................................................................................... 6-32
Eliminate Unused Device Drivers............................................................................................... 6-33
Eliminate Unneeded Exit Code....................................................................................................6-33
Turn off C++ Support...................................................................................................................6-34
Boot Sequence and Entry Point............................................................................................................... 6-34
Hosted Versus Free-Standing Applications...............................................................................6-34
Boot Sequence for HAL-Based Programs...................................................................................6-35
Customizing the Boot Sequence..................................................................................................6-35
Memory Usage........................................................................................................................................... 6-36
Memory Sections............................................................................................................................6-36
Assigning Code and Data to Memory Partitions...................................................................... 6-37
Placement of the Heap and Stack................................................................................................ 6-39
Global Pointer Register.................................................................................................................6-39
Boot Modes.....................................................................................................................................6-41
Working with HAL Source Files..............................................................................................................6-41
Finding HAL Files..........................................................................................................................6-41
Overriding HAL Functions.......................................................................................................... 6-41
Document Revision History for Developing Programs Using the Hardware Abstraction Layer
.................................................................................................................................................................6-42
Developing Device Drivers for the Hardware Abstraction Layer......................7-1
Driver Integration in the HAL API...........................................................................................................7-1
The HAL Peripheral-Specific API............................................................................................................. 7-2
Preparing for HAL Driver Development..................................................................................................7-2
Development Flow for Creating Device Drivers..................................................................................... 7-2
Nios II Hardware Design Concepts...........................................................................................................7-3
TOC-6
Altera Corporation