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.

SYS/BIOS startup function

in ccs4 & DSP/BIOS I could set a "User Init Function" in TConf - how do I do thgis in ccs5 & SYS/BIOS?

I am looking at the XDC "Runtime Start/Initialization" tab in my ccs5 SYS/BIOS CFG.  but all of the fields are disabled and I cannot find any way to set the one I need

 

  • Kurt,

    I need to research more on the “why” this is, but can confirm that you cannot edit these fields in the graphical view.  You can view what functions have been configured, but you cannot edit these arrays in the graphical editor.

    To do this, you need to click on the “Source” tab at the bottom of this graphical page and then add some configuration script. 

    For example, to add your own function myFirstFxn() to the Startup_firstFxn[] array, you can add this:

        var Startup = xdc.useModule('xdc.runtime.Startup');
        Startup.firstFxns[Startup.firstFxns.length++] = '&myFirstFxn';

    And to add to the Startup_lastFxn[] array:

        Startup.lastFxns[Startup.lastFxns.length++] = '&myLastFxn';

    And to add a function that gets called during BIOS_start(), you can do this:

        var BIOS = xdc.useModule('ti.sysbios.BIOS');
        BIOS.addUserStartupFunction('&myBiosStartFxn');

    After editing the script save it and build the program.  You can also switch back to the graphical view to see your additions.

    It may help to look at this description of the Startup sequence, which shows the different stages of Startup, and how to add your own functions to this sequence:
    http://processors.wiki.ti.com/index.php/SYS/BIOS_for_the_MSP430#Boot_sequence_with_SYS.2FBIOS  This page is for MSP430, but generally applies to other device families too.

    Scott

  • thanks, was waiting to see if my graphical input was broken.

    I did find the manual coding approach.  and it works for me.

    FYI - I found this page to be the most useful example - http://rtsc.eclipse.org/docs-tip/Using_xdc.runtime_Startup/TI