Article ID: 000079588 Content Type: Troubleshooting Last Reviewed: 01/01/2015

Build Errors on Interrupt API Calls

Environment

    Quartus® II Subscription Edition
BUILT IN - ARTICLE INTRO SECOND COMPONENT

Critical Issue

Description

You might observe build errors if your application project installs an ISR that calls the alt_irq_register() function.

The Nios II EDS version 9.1 includes support for an optional External Interrupt Controller (EIC) interface on the Nios II processor. To support the EIC interface, the HAL includes an enhanced interrupt API.

When you create a BSP, the SBT determines which interrupt API(s) the device drivers in your system support. If all registered drivers in the BSP identify themselves as supporting the enhanced API, the SBT implements the enhanced API. All Altera device drivers in version 9.1 and later support the enhanced API.

When the enhanced API is implemented, the legacy interrupt API, including alt_irq_register(), is not available. Therefore, if the application code contains a call to a legacy API function, a linker error occurs.

This issue might affect application projects that call alt_irq_register() or other legacy interrupt API functions directly, rather than depending on drivers in the BSP for interrupt support.

If your Nios II application project's source code registers an ISR using alt_irq_register(), or includes an ISR, your application might fail to compile in the Nios II EDS version 9.1, due to undefined references to alt_irq_register(), or to a change to the ISR function prototype.

Resolution

Modify your application code to use the new enhanced interrupt API. To use the enhanced API, you must modify several function calls and all ISR function prototypes.

For information about supporting the enhanced interrupt API, refer to the Exception Handling chapter of the Nios II Software Developer\'s Handbook, or to AN 595: Vectored Interrupt Controller Usage and Applications.

You must upgrade to the enhanced API if you wish to use an EIC in your hardware design to accelerate interrupt response time. The enhanced API also works with the Nios II processor\'s internal interrupt controller.

Related Products

This article applies to 1 products

Intel® Programmable Devices

1