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.

CCS: How to enable the frame pointer while compiling with CCS



Tool/software: Code Composer Studio

Hi,

We are using CCS for AM335x code compilation with bare metal software. I want to get the stack trace using the frame pointer but dont see any valid content in r11 for frame pointer. GCC has the option of -fno-omit-frame-pointer to enable the frame pointer while building the code but dont see any such option in CCS. Do we have any option in CCS which can enable the frame pointer.

  • To add a GCC compiler option not represented in the build dialog, use the miscellaneous entry shown in the screen shot below.

    Thanks and regards,

    -George

  • Thanks George,

    Unfortunately, I cant see these options in my Code Composer Studio. I am using the CCS version 7.3. Can you please help me option available with version 7.3? Which version are you using?

    Code Composer Studio

    Version: 7.3.0.00019

    Regards

    Sumit

  • I apologize for the delay.

    You can also directly edit the compiler flags.  Please see the screen shot below for guidance.

    Thanks and regards,

    -George

  • Thanks George,

    I don't see  GNU compiler Tab in Build option. I see only "ARM Compiler", "ARM Linker" in the build tab while expanding the option "show build settings". When i enter the option " -fno-omit-frame-pointer" in ARM compiler flags then it does not recognize it.  It throws the below error.

    Please click 'Details' for more information...
    Unrecognized flags entered: -fno-omit-frame-pointer

    Am i missing anything?

  • When you create a new CCS project, among the choices you make is which compiler to use.  You can choose a GNU ARM compiler or a TI ARM compiler.  All this time I presumed your project used a GNU ARM compiler.  But, you must have chosen to use a TI ARM compiler when you created the project.  If that is the case, the screen shots I show above do not appear.  And the build option -fno-omit-frame-pointer is not valid.

    Thanks and regards,

    -George

  • Thanks George,

    We are using the TI ARM compiler. Due to this we are not able to select the option -fno-omit-frame-pointer.  Can you please help on how to get valid frame pointer while using the TI ARM compiler?

  • Unfortunately, the TI ARM compiler has no method for forcing a frame pointer to be used in a function.

    Thanks and regards,

    -George