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.

Compiler/TMS320F2811: error with long long type in F2811, but not F2809

Part Number: TMS320F2811
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: TI C/C++ Compiler

Hi,

I have compiler and linker issue.

The issue is related with long long variable type and happens only in F2811, but not in F2809.

It is strange that two CPUs have the same core and instruction set.

The compiler is "C2000 Code Generation Tools 4.1.3".

It seems that the linker cannot find LL$$MPY in the library.

Here is the error message.

15:41:33 **** Incremental Build of configuration Debug for project iS7_Main_STD_PMVF_S1.30_D0.02_C1.01_200914 ****
"C:\\CCStudio_v3.3\\cc\\bin\\timake.exe" "D:\\project\\2020\\30. Issue Technology\\10. PM VF\\30. SW\\01. iS7\\iS7_Main_STD_PMVF_S1.30_D0.02_C1.01_200914\\XPrima.pjt" debug
----------------------------- XPrima.pjt - Debug -----------------------------

[Linking...] "C:\Program Files (x86)\Texas Instruments\C2000 Code Generation Tools 4.1.3\bin\cl2000" -@"Debug.lkf"

<Linking>

undefined first referenced

symbol in file

--------- ----------------

LL$$MPY D:\project\2020\30. Issue Technology\10. PM VF\30. SW\01. iS7\iS7_Main_STD_PMVF_S1.30_D0.02_C1.01_200914\Debug\Mot_Pwm.obj

>> error: symbol referencing errors - './Debug/XPrima.out' not built

>> Compilation failure

Build Complete,

2 Errors, 0 Warnings, 0 Remarks.

"C:/CCStudio_v3.3/cc/bin/timake.exe D:\project\2020\30. Issue Technology\10. PM VF\30. SW\01. iS7\iS7_Main_STD_PMVF_S1.30_D0.02_C1.01_200914\XPrima.pjt debug" terminated with exit code 100. Build might be incomplete.

15:41:37 Build Finished. 0 errors, 0 warnings. (took 3s.635ms)

Here is the code.

typedef long int32;
typedef long long int64;
int32 HPF32v2(int32 x, int32 *x_old, int64 *y_old, int32 alpha)
{
    int64 tmp1, tmp2, tmp3;
    tmp1 = ((int64)(x - *x_old)) * (int32)alpha;
    tmp2 = (*y_old * (int32)alpha) >> HPF32_SHIFT; // 48 bit * 16 bit >> 16 = 48 bit
    tmp3 = tmp1 + tmp2;
    *y_old = tmp3;
    *x_old = x;
    return tmp3 >> HPF32_SHIFT;
}