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.

TMS320F28388D: Something is missing in the CLAmath library in C2000Ware 4.01 - the CLA FFT routines don't work in EABI

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello,
I tried migrate some FFT routines from CPU to CLA using the CLAmath library from C2000Ware but with no luck. I started with the example "cla_rfft_512" (this is originally in COFF), so I've switched to the EABI library but I get the linker error:

Fullscreen
1
2
3
4
5
6
7
8
undefined first referenced
symbol in file
--------- ----------------
CLA_CFFT_run256Pt ./rfft_512.obj
CLA_CFFT_unpack512Pt ./rfft_512.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "cla_rfft_512.out" not built
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

After digging some time I managed to compile it when adding the underscores in front of the called functions, like "_CLA_CFFT_run256Pt()".
It seems to me that there are missing some entries in the CLAmath source library file "CLAeabi.asm" - there are no entries for FFT routines.

And also, I forgot to mention, in the CLAmath manual there are no usage instructions for RFFT and Unpack routines.

Regards,
Andy

  • Hi Andy,

    Thank you for catching this, indeed the EABI symbols are missing. Here are the steps to get you unblocked.

    1. Add the following to the CLAeabi.asm:

    ;
    ; FFT
    ;
    .asg CLA_CFFT_run256Pt, _CLA_CFFT_run256Pt
    .asg cla_twiddleFactors, _cla_twiddleFactors
    .asg cla_bitReversalTable, _cla_bitReversalTable
    .asg CLA_CFFT_unpack256Pt, _CLA_CFFT_unpack256Pt
    .asg IOBuffer, _IOBuffer
    .asg IOBuffer2, _IOBuffer2

    2. Import the CLAmath library project: <C2000Ware>\libraries\math\CLAmath\c28\ccs\cla_type2\cla2_math_library.projectspec

    3. Right click on cla2_math_library, Build Configurations -> Set Active -> CLAMATHLIB_STD_EABI

    4. Right click on cla2_math_library, Properties -> General. Change output format from legacy COFF to EABI

    5. Build project. This will update the library in <C2000Ware>\libraries\math\CLAmath\c28\lib

    6. Rebuild your application while linking to "cla2_math_library_eabi/lib".

    Let me know if you are still facing issues. We will get this fixed in the next C2000Ware release.

    And also, I forgot to mention, in the CLAmath manual there are no usage instructions for RFFT and Unpack routines

    Regarding this question, what specific information are you looking for?

    Thanks,

    Ashwini

  • Hi Ashwini,

    I tried with the steps you give, but still the error remains. Maybe I do something wrong. I tried compiling the examples in C2000Ware (there are five of them, all for F2837x and CLA type 1) in EABI mode, but with no success. There appear also some new warnings that needs fixes. I think TI have to test all of the examples in EABI mode and when it will be working update all the files in the new C2000Ware. 

    Regarding the manual question: the remaining routines (RFFT and unpack) should be included just like the rest. Not only for completeness, but to decribe the requirements for input and output buffers (for example: there is no mention in the manual of the IOBuffer2, no mention that the unpack is off-place routine, etc.) This information is given in the assembly source files only.

    Regards,
    Andy

  • Hi Andy,

    I tried with the steps you give, but still the error remains. Maybe I do something wrong. I tried compiling the examples in C2000Ware (there are five of them, all for F2837x and CLA type 1) in EABI mode, but with no success. There appear also some new warnings that needs fixes. I think TI have to test all of the examples in EABI mode and when it will be working update all the files in the new C2000Ware. 

    The E2E was tagged with TMS320F28388D, which uses a CLA type 2. For F2837x its CLA Type 1. In the steps above, please use the projectspec: <C2000Ware>\libraries\math\CLAmath\c28\ccs\cla_type1\cla1_math_library.projectspec.

    Regarding the manual question: the remaining routines (RFFT and unpack) should be included just like the rest. Not only for completeness, but to decribe the requirements for input and output buffers (for example: there is no mention in the manual of the IOBuffer2, no mention that the unpack is off-place routine, etc.) This information is given in the assembly source files only.

    Thanks for the good feedback. We will add this to our documentation.

    Thanks,
    Ashwini

  • Hi Ashwini,

    In the steps above, please use the projectspec: <C2000Ware>\libraries\math\CLAmath\c28\ccs\cla_type1\cla1_math_library.projectspec.

    Off course I've selected the appropriate project and library. I tried all five examples and different build configurations.
    Did you manage the compile one of the examples in EABI? 

    Regards,
    Andy

  • I've finally found the way to compile it successfully. The missing piece was adding the line:

    Fullscreen
    1
    .include "CLAeabi.asm"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    in all of the fft assembly files.
    So, the CLAeabi.asm modification as Ashwini described earlier, the include line above, then recompilation of the library and it should work as expected in EABI mode.

    Regards,
    Andy

  • One more question regarding alignment requirements for IOBuffer and IOBuffer2.
    1. The manual states:

    "The FFT buffer must be aligned to a 12-bit address, usually the starting address of one of
    the CLA data RAMs."

    But the comment in the main.c of the cla_rfft_xxx example says something different:

    "The input is placed in a section IOBuffer that needs to be aligned to the size of the input in words to allow the
    bit reverse addressing in stage 1 of the FFT to work properly."

    Which one is correct?

    2. Is there any alignment requirement for IOBuffer2 ?

    Regards,
    Andy

  • Hi Andy, I will ask the experts and get back to you.

    Thanks,
    Ashwini

  • The missing piece was adding the line:

    Ah yes, I apologize, I missed listing this step in my post above.

  • Hi Andy,

    The Expert is out of office for a week. I looked at the map file of the example and IOBuffer2 does not seem to have a 12-bit alignment requirement, it only needs to be word aligned as it is an array of 32-bit floats. For example I looked at, in the map file, IOBuffer2 starts at address 0x9404.

    For now, please consider that the IOBuffer needs to be aligned to 12-bit address. I will confirm again next week once the expert is back.

    Thanks,

    Ashwini