Specifications

For more information, refer to “Settings Managed by the Software Build Tools” in the "Nios II Software
Build Tools Reference" chapter of the Nios II Software Developer’s Handbook.
Note: Register the instruction-related exception handler as early as possible in function main(). This
allows you to handle abnormal condition during startup. You register an exception handler from
the alt_main() function.
For more information about alt_main(), refer to “Boot Sequence and Entry Point” in the "Developing
Programs Using the Hardware Abstraction Layer" chapter of the Nios II Software Developer’s Handbook.
Related Information
Developing Programs Using the Hardware Abstraction Layer on page 6-1
Nios II Software Build Tools Reference on page 15-1
Removing an Instruction-Related Exception Handler
To remove a registered instruction-related exception handler, your C code must call the
alt_instruction_exception_register() function, as follows:
alt_instruction_exception_register ( null, null );
When the HAL removes the instruction-related exception handler, it restores the default break/optional
trap logic.
Document Revision History for Exception Handling
Date Version Changes
May 2015 2015.05.14
Maintenance release.
Renamed to Nios II Classic.
May 2011 11.0.0
Introduction of Qsys system integration tool
Interrupt vector custom instruction only available with SOPC
Builder
February 2011 10.1.0 Removed “Referenced Documents” section.
July 2010 10.0.0 Maintenance release.
November 2009 9.1.0
Described HAL support for external interrupt controller interface.
Described HAL support for shadow register sets with external
interrupt controller interface.
Described enhanced HAL interrupt API.
Legacy HAL interrupt API deprecated.
Removed information specific to the Nios II Integrated Develop‐
ment Environment (IDE).
March 2009 9.0.0
Reorganized and updated information and terminology to clarify
role of Nios II Software Build Tools.
Corrected minor typographical errors.
NII5V2
2015.05.14
Removing an Instruction-Related Exception Handler
8-35
Exception Handling
Altera Corporation
Send Feedback