RISC-V exception APIs - RISC-V exception APIs - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

The xil_exception.h file available in the <install-directory>/src/riscv folder contains RISC-V specific exception related APIs and macros.

Application programs can use these APIs/Macros for various exception related operations, for example, enable exception, disable exception, and register exception handler.

Note: To use exception related functions, the xil_exception.h file must be added in source code.
Table 1. Quick Function Reference
Type Name Arguments
void Xil_ExceptionNullHandler
  • void * Data
void Xil_ExceptionInit
  • void
void Xil_ExceptionEnable
  • void
void Xil_ExceptionDisable
  • void
void Xil_ExceptionRegisterHandler
  • u32 Exception_id
  • Xil_ExceptionHandler Handler
  • void * Data
void Xil_ExceptionRemoveHandler
  • u32 Exception_id