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.

AWR1843BOOST: xdc.runtime.Error.raise: terminating execution when add RTI into the MSS

Part Number: AWR1843BOOST
Other Parts Discussed in Thread: SYSBIOS

Hi team, 

I have used mmwave_sdk_03_06_00_00-LTS\packages\ti\demo\xwr18xx\mmw source for my testing. It was fine when I debug the project with CCS. 

However, I am getting xdc.runtime.error when RTI added into the project. Here are the steps I did: 

1. Include Timer into main.c: #include <ti/sysbios/hal/Timer.h>

2. Create a TimerCreate function: 

void MSS_CreateBIOSTimer(uint32_t timerPeriod)
{
    Timer_Params tParams;
    Error_Block eb;
    Error_init(&eb);
    Timer_Params_init(&tParams);
    tParams.period = timerPeriod*1000; //msec
    tParams.periodType = Timer_PeriodType_MICROSECS;
    tParams.runMode = Timer_RunMode_CONTINUOUS;
    tParams.arg = 1;
    tParams.startMode = Timer_StartMode_USER;
    gStartTime = 0;
    /* create a sysbios timer */
    gTimerHandler = Timer_create(Timer_ANY, MSS_PeriodicFunc, &tParams, &eb);
    if(gTimerHandler == NULL)
    {
        System_printf ("Error: Sysbios Timer create failed\n");
        return;
    }

}

3. Create Function when timer expires: 

static void MSS_PeriodicFunc (UArg arg0)
{
    uint32_t t = Cycleprofiler_getTimeStamp(), t_stamp;
    t_stamp = (t - gStartTime) / R4F_CLOCK_MHZ;
    gStartTime = t;

    System_printf ("\n\r%d: %dus\n\r",t,t_stamp);

}

4. Add Timer into mmw_mss.cfg

int main (void)
{
    Task_Params     taskParams;
    int32_t         errCode;
    SOC_Handle      socHandle;
    SOC_Cfg         socCfg;

    /* Initialize the ESM: Dont clear errors as TI RTOS does it */
    ESM_init(0U);

    /* Initialize the SOC confiugration: */
    memset ((void *)&socCfg, 0, sizeof(SOC_Cfg));

    /* Populate the SOC configuration: */
    socCfg.clockCfg = SOC_SysClock_INIT;
    socCfg.mpuCfg = SOC_MPUCfg_CONFIG;
    socCfg.dssCfg = SOC_DSSCfg_UNHALT;

    /* Initialize the SOC Module: This is done as soon as the application is started
     * to ensure that the MPU is correctly configured. */
    socHandle = SOC_init (&socCfg, &errCode);
    if (socHandle == NULL)
    {
        System_printf ("Error: SOC Module Initialization failed [Error code %d]\n", errCode);
        MmwDemo_debugAssert (0);
        return -1;
    }    
    
    /* Check if the SOC is a secure device */
    if (SOC_isSecureDevice(socHandle, &errCode))
    {
        /* Disable firewall for JTAG and LOGGER (UART) which is needed by all unit tests */
        SOC_controlSecureFirewall(socHandle, 
                                  (uint32_t)(SOC_SECURE_FIREWALL_JTAG | SOC_SECURE_FIREWALL_LOGGER),
                                  SOC_SECURE_FIREWALL_DISABLE,
                                  &errCode);
    }

    /* Initialize and populate the demo MCB */
    memset ((void*)&gMmwMssMCB, 0, sizeof(MmwHoplo_MSS_MCB));

    gMmwMssMCB.socHandle = socHandle;

    /* Debug Message: */
    System_printf ("**********************************************\n");
    System_printf ("Debug: Launching the MMW Demo on MSS\n");
    System_printf ("**********************************************\n");

    /* Initialize the Task Parameters. */
    Task_Params_init(&taskParams);
    gMmwMssMCB.taskHandles.initTask = Task_create(MmwDemo_initTask, &taskParams, NULL);

    /*****************************************************************************
     * Launch a Timer
     *****************************************************************************/
    gTimerPeriod = 10U;  // 10ms by default
    MSS_CreateBIOSTimer(gTimerPeriod);
    /* Timer Start */
    Timer_start(gTimerHandler);

    /* Start BIOS */
    BIOS_start();
    return 0;
}

var Timer     = xdc.useModule('ti.sysbios.hal.Timer');

Finally, the xdc runtime error popup when debug: 

[Cortex_R4_0] **********************************************
Debug: Launching the MMW Demo on MSS
**********************************************
Debug: Launched the Initialization Task
Debug: UART Instance @0800d5c8 has been opened successfully
Debug: mmWave Control Initialization was successful
Debug: mmWave Control Synchronization was successful
{module#42}: line 271: error {id:0x150000, args:[0x3, 0x0]}
xdc.runtime.Error.raise: terminating execution

Please let me know if I missed anything to enable RTI timer for my application. 

Thanks,