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.

Seek the example for module xdc.runtime.SysCallback

Other Parts Discussed in Thread: SYSBIOS

Hello,

I want use the SysCallback's interface to implement the custom funtions when sysbios system perform abort or exit.

something like :

SysCallback.abortFxn = "&Custom_Abort";

SysCallback.exitFxn  = "&Custom_Exit";

but I don't know whether the above setting is corrent or not.

so, who can share the  example project to show the usage about syscallback?

thanks in advance.

B.R

Alex

 

 

  • Hi Alex,

    What you are doing is correct. Make sure you hook it up into System though instead of SysMin or SysStd.

    var System = xdc.useModule('xdc.runtime.System');
    var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
    SysCallback.exitFxn = "&Custom_exit";
    ...
    System.SupportProxy = SysCallback;

    Here is the source code then:

    Void Custom_exit(Int stat)
    {
        printf("Stat = %d\n", stat);
        // do something...e.g. light LED, send info out UART, etc.
    }

    Todd

  • Hello, Todd

    Thanks for your example. it is clear. i will try.