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.

One section per function option in MSP430 TI Compiler

Hi all,

I'd like to know if any options and/or flag commands does exist to have the MSP430 TI Compiler producing one ELF section for each function encountered in the code. A check box indeed exist for the GCC MSP430 compiler, but since I'm switching to the latter builder, I couldn't find this option within the Project window -> CCS Build -> MSP430 Compiler -> Advanced options.

Thanks in advance,

Daniele

  • The option you need is called --gen_func_subsections.  It is documented in the MSP430 compiler manual.  Unfortunately, you cannot select it as a build option in CCS.  This is due to a problem in the compiler.  I filed SDSCM00052153 in the SDOWP system to have this addressed.  Feel free to follow it with the SDOWP link below in my signature.  

    As a workaround, you can manually enter the option.  The screen shot below shows the Set Additional Flags button.  Click it to bring up text box.  Carefully enter --gen_func_subsections at the beginning of the text.  

    Thanks and regards,

    -George

  • Thanks a lot George for your reply. It does indeed produce what I was expecting.