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.

TDA4VM: Issues Using FFTLIB on DSP C71x of TDA4VM with TI Processor SDK RTOS

Part Number: TDA4VM
Other Parts Discussed in Thread: FFTLIB,

Tool/software:

Hello,

I am encountering issues while trying to use the FFTLIB library included in the TI Processor SDK RTOS (version: 10.00.00.05) on the C71x DSP of my TDA4VM. Below, I’ll describe the steps I followed and the errors I encountered:

  1. First Attempt (Code Composer Studio):

    • I created a simple C project with an empty main() function, only calling the library.
    • I am using the ti-cgt-c7000_4.1.1.LTS compiler, and I configured it as follows:
      • Added the FFTLIB path to the compiler’s include directories.
      • Set the DSP C71x as the compilation target.
    • When trying to compile, I encountered the following errors:
      >> Compilation failure
      subdir_rules.mk:7: recipe for target 'main.obj' failed
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 393: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 395: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 396: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 397: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 398: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 400: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 401: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 402: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 403: error #20: identifier "__HWA_CONFIG_REG_v1" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 405: error #20: identifier "__HWA_OFFSET_REG" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 406: error #20: identifier "__HWA_OFFSET_REG" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 407: error #20: identifier "__HWA_OFFSET_REG" is undefined
      "/home/heverton-sds/ti/ti-processor-sdk-rtos-j721e-evm-10_00_00_05/fftlib/src/common/FFTLIB_types.h", line 408: error #20: identifier "__HWA_OFFSET_REG" is undefined
      13 errors detected in the compilation of "../main.c".


  2. Second Attempt (following the FFTLIB User Guide):

    • I followed the FFT library User Guide instructions to build and run the library tests using CMake.
    • I used one of the example cmake commands provided in the guide, and I was able to configure the project without errors.
    • However, when running the build command (cmake --build build), I encountered the following error:

Notes:

  • I was able to successfully use the DSPLIB (also included in this SDK) on the DSP C71x using Code Composer Studio with the same ti-cgt-c7000_4.1.1.LTS compiler, without needing to use CMake.
  • I did not make any modifications to FFTLIB or the examples provided in the User Guide.

My question:

  • Is there any additional configuration or dependency I might be missing to use FFTLIB on the DSP C71x?
  • Any idea what might be causing the above-mentioned errors?

Thank you in advance for your help!

  • Hello,

    We suggest following the accompanying documentation, so it is good that you follow it for your second attempt.

    Before calling the "cmake --build build", what is the cmake command you called to set up the configuration?

    Thanks.

  • Thank you for your response.

    Before running the cmake --build build command, I used the following cmake command to set up the configuration:

     cmake -B build -DTARGET_PLATFORM="PC" -DBUILD_TEST="1" -DKERNEL_NAME="fft_c7x/FFTLIB_fft1dBatched_i32fc_c32fc_o32fc" -DSOC="j721e" \
    -DDEVICE="C7100" -DFFTLIB_DEBUGPRINT="1" -DTEST_CASE="2" -DCMAKE_EXPORT_COMPILE_COMMANDS="TRUE" \
    -DCMAKE_BUILD_TYPE="Release" 

    This is one of the example commands provided in the FFTLIB documentation. I used it exactly as it appears because my target is indeed the j721e, and the device is C7100.

    Additionally, I noticed that if I run this other command, which is also from the documentation:

     cmake -B build -DTARGET_PLATFORM="" -DAUTO_TEST="1" -DSOC="j721e" -DDEVICE="C7100" \
    -DALL_TEST_CASES="1" -DCMAKE_BUILD_TYPE="Release" -DFFTLIB_DEBUGPRINT="0" 
    

    I encounter the following error:



    One thing I noticed is that this error about TI_cache.c happens specifically when I use -DTARGET_PLATFORM="", leaving the parameter empty. When I use -DTARGET_PLATFORM="PC", this error does not occur.

    The configuration step for both commands completes without any errors. However, the issues arise during the build process.

    Let me know if any additional details would be helpful.

    Thank you!

  • As mentioned in the documentation, the TARGET_PLATFORM will tell if you are trying to build for a PC for host emulation or for running on the actual target (TI EVM). Which one do you need?

  • I need to run on the actual target

  • We tried and verified both configuration options you mentioned above, and we do not see any error.  Can you delete the build directory and try again?

  • Hello,

    Thank you for your response and for verifying the configuration options. I followed your suggestion and deleted the build directory, but unfortunately, the error persisted.

    To troubleshoot further, I decided to download the SDK again and test with the new version of fftlib that came with it. After setting it up, the build worked without any issues. This suggests that I may have inadvertently removed or corrupted some files in my previous setup.

    In any case, re-downloading and using a fresh SDK resolved my issue. I appreciate your help!

    Best regards,
    Heverton