Forum Discussion
Altera_Forum
Honored Contributor
21 years agoThere is no public API for adding your own trap handler to the HAL. However if you copy the file alt_exceptions.S from the altera_nios2 component into your system library project, you will be able to modify it to include your own trap handler.
Search for the "trap_handler" symbol in that file, and you will see where to add your own code.