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.

CCS/TMS320F28375D: Can not define more than one "CpuToCla1MsgRAM" variable

Part Number: TMS320F28375D

Tool/software: Code Composer Studio

This allows me to reference the max variable in the CLA:

//#pragma DATA_SECTION(min,"CpuToCla1MsgRAM");
#pragma DATA_SECTION(max,"CpuToCla1MsgRAM");
//int min;
int max;

This will not allow me to reference either variable in the CLA:

#pragma DATA_SECTION(min,"CpuToCla1MsgRAM");
#pragma DATA_SECTION(max,"CpuToCla1MsgRAM");
int min;
int max;

Any idea why?

  • Hi,

    Are you getting in any compiler/linker error on doing this?

    Regards,

    Veena

  • Hi Veena, I am not.

  • Also, this only applies to the CLA, variables can be used on the CPU. I am using this function from one of the examples to config the CLA memory.

    void CLA_configClaMemory(void) // CLA_configClaMemory - Configure CLA memory sections
    {
        extern uint32_t Cla1funcsRunStart, Cla1funcsLoadStart, Cla1funcsLoadSize;
        EALLOW;
    
    #ifdef _FLASH
        //
        // Copy over code from FLASH to RAM
        //
        memcpy((uint32_t *)&Cla1funcsRunStart, (uint32_t *)&Cla1funcsLoadStart,
                (uint32_t)&Cla1funcsLoadSize);
    #endif //_FLASH
    
        //
        // Initialize and wait for CLA1ToCPUMsgRAM
        //
        MemCfgRegs.MSGxINIT.bit.INIT_CLA1TOCPU = 1;
        while(MemCfgRegs.MSGxINITDONE.bit.INITDONE_CLA1TOCPU != 1){};
    
        //
        // Initialize and wait for CPUToCLA1MsgRAM
        //
        MemCfgRegs.MSGxINIT.bit.INIT_CPUTOCLA1 = 1;
        while(MemCfgRegs.MSGxINITDONE.bit.INITDONE_CPUTOCLA1 != 1){};
    
        //
        // Select LS4RAM and LS5RAM to be the programming space for the CLA
        // First configure the CLA to be the master for LS4 and LS5 and then
        // set the space to be a program block
        //
        MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
        MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;
        MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
        MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;
    
        //
        // Next configure LS0RAM and LS1RAM as data spaces for the CLA
        // First configure the CLA to be the master for LS0(1) and then
        // set the spaces to be code blocks
        //
        MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1;
        MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0;
    
        MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1;
        MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0;
    
        EDIS;
    }

  • Well, I hate to admit it, but I spent days on this problem before I remembered something I read years ago about CLA data types being handled differently. I searched the forums and there it was: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/795567

    I switched my int to uint16_t and everything works. Ironically I have a personal policy of never using int, I just copied it from an example here and didn't think twice.