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: PSDKRA - Turn off C6x compiler optimization for user kernel

Part Number: TDA4VM

Hello,

I am working on PSDK 6.1.

I am attempting to port an algorithm which runs on one of the C6x DSP cores.

So I have created a user kernel named 'msi_vfs' in tiovx/kernels_j7.

Now, I need to turn off the optimization which is carried out by the C6x compiler for this user kernel.

The global C6x optimizer setting is present in tiovx/concerto/compilers/cgt6x.mak file.

How can I override this setting locally so that my user kernel is not optimized?

Thank you.

  • In the local concerto.mak file you can use the CFLAGS variable to add compiler options.  Since these are typically compiler specific, you may want to surround it with a core or compiler specific condition in case you are trying to build this for multiple targets or compilers:  You can add something like this:

    ifeq ($(TARGET_CPU), $(filter $(TARGET_CPU), C66))
    CFLAGS      += -g -o0
    endif

    This basically adds the c66 compiler options "-g -o0" to the compiler command line for all files compiled in this concerto.mak file target.  Since this appears in the command line after the existing -o3 optimization flag, it will overwrite the -o3 and turn off optimizations.

    Jesse