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.

TMS320F280049: compile error: [E0000] CLA instructions cannot appear with non-CLA instructions in the same section

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi Expert,

There are originally some EPWM_XXXX function calls such as below in my CLA TASK 4  which is in .cla file:

EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_B, Ton_AC_EPWM_Bootstrap_Charge );

EPWM_setCounterCompareValue(EPWM1_BASE,EPWM_COUNTER_COMPARE_B,EPWM1_Compare );

It compiles and works fine.

But after I add line below in my CLA TASK 4  which is in .cla file:

EPWM_setDigitalCompareEdgeFilterEdgeCount(EPWM1_BASE, 1);

it errors out with error message below when compiling:

Invoking: C2000 Compiler
"C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O3 --opt_for_speed=2 --fp_mode=relaxed --include_path="C:/Users/fuque/workspace_DS3/Rev1/V2/QT2_AC_side/libraries/SPLL" --include_path="C:/Users/fuque/workspace_DS3/Rev1/V2/QT2_AC_side/libraries" --include_path="C:/Users/fuque/workspace_DS3/Rev1/V2/QT2_AC_side" --include_path="C:/Users/fuque/workspace_DS3/Rev1/V2/QT2_AC_side/device" --include_path="C:/Users/fuque/workspace_DS3/Rev1/V2/QT2_AC_side/device/include" --include_path="C:/ti/c2000/C2000Ware_3_01_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/ccs1030/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" --define=_QT2 --define=_DEBUG --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --cla_background_task=on --cla_signed_compare_workaround=on -k --preproc_with_compile --preproc_dependency="QT2_AC.d_raw" "../QT2_AC.cla"
"QT2_AC.asm", ERROR! at line 1747: [E0000] CLA instructions cannot appear with non-CLA instructions in the same section
EALLOW

Any idea what is wrong?

  • Hi Quentin,

    My guess is that the EALLOW define is not being mapped to the CLA meallow instruction and instead the C28 eallow instruction is being used.

    In cpu.h the following lines does this mapping (Note, for .cla files the define __TMS320C28XX_CLA__ is predefined by the compiler and so the meallow should get picked up automatically when compiling .cla files)

    //
    // Define to allow writes to protected registers
    //
    #ifndef EALLOW
    #ifndef __TMS320C28XX_CLA__
    #define EALLOW __eallow()
    #else
    #define EALLOW __meallow()
    #endif // __TMS320C28XX_CLA__
    #endif // EALLOW

    I was not able to reproduce this issue at my end. Can you let me know which C2000Ware version are you using?

    Thanks,

    Ashwini