Hi,
What should be done on DSP to throw an exception when we try to dereference a NULL pointer, i.e. &(0) dereference ?
Regards,
Amith
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm working on C6678.
I was able to now get an NULL pointer exception and it routes to the default exception handler which prints the CORE Pac register values on CCS debugger console.
But I now need to hook in my own exception handler. It would be good if someone helps me out to do the same.
Regards,
Amy
Hi Amy,
SYS/BIOS provides 'ti.sysbios.family.c64p.Exception'. I think you can register exception handlers as hook.
Regards,
Atsushi
Hi Amy,
Here's some example code for you.
For your *.cfg file:
var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
Exc.exceptionHook = '&myExceptionHook';
Exc.internalHook = '&myInternalHook';
Then in your C code:
Void myExceptionHook(Void)
{
System_printf("myExceptionHook:\n");
}
Void myInternalHook(Void)
{
...
Steve
Hi Amy,
I have attached an example project based on the Steven's suggestion. It is not intended for running but for just building purpose.
Regards,
Atsushi