Forum Discussion
Altera_Forum
Honored Contributor
21 years ago[Nios II]: questions on "trap" and modelsim
Hi, I started to use the "Nios II/fast core" and made some timing tests. but I got some trouble to find out how "trap" work. in assembly, when user issue a trap: ....
tra...
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.