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.

TMS320F280049C: C2000 CLA compiler and linker

Part Number: TMS320F280049C

Hello all,

I want to use some features of CLA on my 320F280049C controller. I have tried cla_ex5_adc_just_in_time example code from CCSware_4_01. Now I want use some part of this code in my application code(GPIO toggle). The modified program get compile and debug successfully but LED won't toggle. I have also given the right path cla linker file. I have used LS0-program LS1,LS2-data ram of CLA but Memory allocation shows 0% after build project. Is there any settings to enable CLA to compile the program. Kindly find the attached images for the reference.

void claInit(){
    //
 #if defined(_FLASH)
     memcpy((uint32_t *)&Cla1ProgRunStart, (uint32_t *)&Cla1ProgLoadStart,
            (uint32_t)&Cla1ProgLoadSize);
     memcpy((uint32_t *)&Cla1ConstRunStart, (uint32_t *)&Cla1ConstLoadStart,
         (uint32_t)&Cla1ConstLoadSize );
 #endif //defined(_FLASH)


     //
     // CLA Program will reside in RAMLS0 and data in RAMLS1, RAMLS2
     //
     MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS0, MEMCFG_LSRAMMASTER_CPU_CLA1);
     MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS1, MEMCFG_LSRAMMASTER_CPU_CLA1);
     MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS2, MEMCFG_LSRAMMASTER_CPU_CLA1);
     MemCfg_setCLAMemType(MEMCFG_SECT_LS0, MEMCFG_CLA_MEM_PROGRAM);
     MemCfg_setCLAMemType(MEMCFG_SECT_LS1, MEMCFG_CLA_MEM_DATA);
     MemCfg_setCLAMemType(MEMCFG_SECT_LS2, MEMCFG_CLA_MEM_DATA);
 #if defined(_FLASH)
     //
     // In Flash config, constants are loaded in Flash and then copied to LS3.
     // CLA reads the constants from LS3.
     //
     MemCfg_setCLAMemType(MEMCFG_SECT_LS3, MEMCFG_CLA_MEM_DATA);
     MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS3, MEMCFG_LSRAMMASTER_CPU_CLA1);
 #endif //defined(_FLASH)

#pragma diag_suppress=770

    //
    // Assign the task vectors and set the triggers for task 1
    // and 8
    //
    CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_1, (uint16_t)&Cla1Task1);
    CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_8, (uint16_t)&Cla1Task8);
    CLA_setTriggerSource(CLA_TASK_1, CLA_TRIGGER_TINT0);
    CLA_setTriggerSource(CLA_TASK_8, CLA_TRIGGER_SOFTWARE);

#pragma diag_warning=770

    //
    // Enable Tasks 1 and 8
    //
    CLA_enableTasks(CLA1_BASE, (CLA_TASKFLAG_1 | CLA_TASKFLAG_8));

    //
    // Force task 8, the one time initialization task to initialize
    // the CLA global variables
    //
    CLA_forceTasks(CLA1_BASE, CLA_TASKFLAG_8);

}

//dev board led gpio 23,34
void setupProfileGpio(void)
{
        GPIO_setDirectionMode(23,GPIO_DIR_MODE_OUT);
        GPIO_setQualificationMode(23,GPIO_QUAL_SYNC);
        GPIO_setPinConfig(GPIO_23_GPIO23);
        GPIO_writePin(23,0);
        GPIO_setMasterCore(23, GPIO_CORE_CPU1_CLA1);
}