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.

error: option --optimize_with_debug is missing its parameter 'on,off

Other Parts Discussed in Thread: MSP430G2153

I'm receiving two Compilation failure and I am not sure how to resolve.

error: option --optimize_with_debug is missing its parameter 'on,off'

fatal error #10192: Failed linktime optimization

I just un-installed CCSv5.1 and installed CCSv5.2 and I am unsure why my previous project that did work will no longer compile.

From the summary of commands being used, I did select the  --optimize_with_debug=off

any suggestions?

summary of flags set:

-vmsp --abi=eabi -O4 -g --optimize_with_debug=off --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal

  • Terry,

    I can't seem to reproduce this. Is this a project created with CCSv5.1 that you are building in 5.2? Could you zip up and attach the project that generates this error?

  • Sorry, I cannot send you a copy of my project, but I can provide the compiler error output generated by CCSv5.2.0 and the good compile output generated by CCSv5.1.0.

    What I can tell you of the project is that in CCSv5.1.0, I had to compile with optimization set to 4 and with size being a concern.

    My output generated object size is at 0x3AA

    I've re-created the project from grace from scratch in the CCSv5.2.0 version and had a co-worker watch me to make sure I configured both project the same way.

    ==============================================================================================================

    Here's the good version generated by CCSv5.1.0:

    Compiler summary:

    -vmsp --abi=coffabi -O4 --opt_for_speed=0 --include_path="D:/TI5.1/ccsv5/ccs_base/msp430/include" --include_path="D:/TI5.1/ccsv5/tools/compiler/msp430/include" --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal

    Linker summary:

    -vmsp --abi=coffabi -O4 --opt_for_speed=0 --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal -z -m"HRV.map" --stack_size=80 --heap_size=80 -i"D:/TI5.1/ccsv5/ccs_base/msp430/include" -i"D:/TI5.1/ccsv5/tools/compiler/msp430/lib" -i"D:/TI5.1/ccsv5/tools/compiler/msp430/include" --reread_libs --warn_sections --rom_model


    **** Build of configuration Release for project HRV ****

    D:\TI5.1\ccsv5\utils\bin\gmake -k all
    'Building file: ../main.cfg'
    'Invoking: XDCtools'
    "D:/TI5.1/xdctools_3_22_04_46/xs" --xdcpath="D:/TI5.1/grace_1_10_00_17/packages;" xdc.tools.configuro -o configPkg -t ti.targets.msp430.MSP430 -p ti.platforms.msp430:MSP430G2153 -r debug -c "D:/TI5.1/ccsv5/tools/compiler/msp430" --compileOptions "--symdebug:dwarf --optimize_with_debug" "../main.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring main.x430 from package/cfg/main_p430.cfg ...
    cl430 package/cfg/main_p430.c ...
    'Finished building: ../main.cfg'
    ' '
    making ../src/csl/csl.lib ...
    gmake[1]: Nothing to be done for `all'.
    'Building file: ../HRV_ctrl.c'
    'Invoking: MSP430 Compiler'
    "D:/TI5.1/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -O4 --opt_for_speed=0 --include_path="D:/TI5.1/ccsv5/ccs_base/msp430/include" --include_path="D:/TI5.1/ccsv5/tools/compiler/msp430/include" --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal --preproc_with_compile --preproc_dependency="HRV_ctrl.pp" --cmd_file="./configPkg/compiler.opt" "../HRV_ctrl.c"
    'Finished building: ../HRV_ctrl.c'
    ' '
    'Building file: ../HRV_hwInterface.c'
    'Invoking: MSP430 Compiler'
    "D:/TI5.1/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -O4 --opt_for_speed=0 --include_path="D:/TI5.1/ccsv5/ccs_base/msp430/include" --include_path="D:/TI5.1/ccsv5/tools/compiler/msp430/include" --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal --preproc_with_compile --preproc_dependency="HRV_hwInterface.pp" --cmd_file="./configPkg/compiler.opt" "../HRV_hwInterface.c"
    'Finished building: ../HRV_hwInterface.c'
    ' '
    'Building file: ../main.c'
    'Invoking: MSP430 Compiler'
    "D:/TI5.1/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -O4 --opt_for_speed=0 --include_path="D:/TI5.1/ccsv5/ccs_base/msp430/include" --include_path="D:/TI5.1/ccsv5/tools/compiler/msp430/include" --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: HRV.out'
    'Invoking: MSP430 Linker'
    "D:/TI5.1/ccsv5/tools/compiler/msp430/bin/cl430" -vmsp --abi=coffabi -O4 --opt_for_speed=0 --define=__MSP430G2153__ --diag_warning=225 --display_error_number --single_inline --remove_hooks_when_inlining --printf_support=minimal -z -m"HRV.map" --stack_size=80 --heap_size=80 -i"D:/TI5.1/ccsv5/ccs_base/msp430/include" -i"D:/TI5.1/ccsv5/tools/compiler/msp430/lib" -i"D:/TI5.1/ccsv5/tools/compiler/msp430/include" --reread_libs --warn_sections --rom_model -o "HRV.out" -l"./configPkg/linker.cmd" "./main.obj" "./HRV_hwInterface.obj" "./HRV_ctrl.obj" -l"libc.a" "../lnk_msp430g2153.cmd"
    <Linking>
    warning #10341-D: The --symbol_map option is not supported when performing
    link-time optimization. All --symbol_map options will be ignored.
    'Finished building target: HRV.out'
    ' '

    **** Build Finished ****

    ==============================================================================================================

    Here's the error generated from CCSv5.2.0:

    Compiler summary:

    -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal

    Linker Summary:

    -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z --stack_size=80 -m"HRV.map" --heap_size=80 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model

    **** Build of configuration Debug for project HRV ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    making ../src/csl/csl.lib ...
    cle430 CSL_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" CSL_init.c
    cle430 GPIO_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" GPIO_init.c
    cle430 BCSplus_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" BCSplus_init.c
    cle430 Timer0_A3_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" Timer0_A3_init.c
    cle430 System_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" System_init.c
    cle430 WDTplus_init.c ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430 --abi=eabi -c --obj_directory=objs/ -vmsp -g --symdebug:dwarf --optimize_with_debug -qq -pdsw225 -D__MSP430G2153__ -I C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include -I "C:/ti/grace_1_10_04_36/packages" -I "C:/ti/grace_1_10_04_36/packages/ti/mcu/msp430//include" WDTplus_init.c
    are430 csl.lib objs\CSL_init.obj ...
    C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/ar430 rq csl.lib objs\CSL_init.obj objs\GPIO_init.obj objs\BCSplus_init.obj objs\Timer0_A3_init.obj objs\System_init.obj objs\WDTplus_init.obj
    'Building file: ../main.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_23_03_53/xs" --xdcpath="C:/ti/grace_1_10_04_36/packages;C:/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.msp430.elf.MSP430 -p ti.platforms.msp430:MSP430G2153 -r debug -c "C:/ti/ccsv5/tools/compiler/msp430_4.1.0" --compileOptions "--symdebug:dwarf --optimize_with_debug" "../main.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring main.xe430 from package/cfg/main_pe430.cfg ...
    cle430 package/cfg/main_pe430.c ...
    'Finished building: ../main.cfg'
    ' '
    'Building file: ../HRV_ctrl.c'
    'Invoking: MSP430 Compiler'
    "C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430" -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="HRV_ctrl.pp" --cmd_file="./configPkg/compiler.opt" "../HRV_ctrl.c"
    'Finished building: ../HRV_ctrl.c'
    ' '
    'Building file: ../HRV_hwInterface.c'
    'Invoking: MSP430 Compiler'
    "C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430" -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="HRV_hwInterface.pp" --cmd_file="./configPkg/compiler.opt" "../HRV_hwInterface.c"
    'Finished building: ../HRV_hwInterface.c'
    ' '
    'Building file: ../main.c'
    'Invoking: MSP430 Compiler'
    "C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430" -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.c"
    "../main.c", line 48: remark #1535-D: (ULP 8.1) variable "infiniteLoop" is used as a constant. Recommend declaring variable as either 'static const' or 'const'
    'Finished building: ../main.c'
    ' '
    'Building target: HRV.out'
    'Invoking: MSP430 Linker'
    "C:/ti/ccsv5/tools/compiler/msp430_4.1.0/bin/cl430" -vmsp --abi=eabi -O4 --opt_for_speed=0 -g --optimize_with_debug=off --advice:power=all --define=__MSP430G2153__ --diag_warning=225 --display_error_number --diag_wrap=off --printf_support=minimal -z --stack_size=80 -m"HRV.map" --heap_size=80 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.0/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model -o "HRV.out" -l"./configPkg/linker.cmd" "./main.obj" "./HRV_hwInterface.obj" "./HRV_ctrl.obj" -l"libc.a" "../lnk_msp430g2153.cmd"
    <Linking>
    remark #10371-D: (ULP 1.1) Detected no uses of low power mode state changes using LPMx or _bis_SR_register() or __low_power_mode_x() in this project.
    warning #10341-D: The --symbol_map option is not supported when performing link-time optimization. All --symbol_map options will be ignored.
    remark #10372-D: (ULP 4.1) Detected uninitialized Port 1 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
    remark #10372-D: (ULP 4.1) Detected uninitialized Port 2 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
    remark #10372-D: (ULP 4.1) Detected uninitialized Port 3 in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
    error: option --optimize_with_debug is missing its parameter 'on,off'

    >> Compilation failure

    >> Compilation failure
    fatal error #10192: Failed linktime optimization

    >> Compilation failure
    gmake: *** [HRV.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Terry,

    I've been able to reproduce this issue. The key is that it has to be a Grace (RTSC) project and with optimization set to -o4. We are investigating further into the root cause of the error and will update this thread when we have more information.

  • Terry, we're looking further into the issue.

    I'm wondering if you can back off to (--opt_level=3) as a work-around for now?

  • I can partially reproduce this problem in the following way:

      The argument to the --optimize_with_debug [on|off] option was added in the 4.1.0 release; prior to that the option did not take an argument.  If the final link includes link time optimization and the --optimizae_with_debug option and links with any object files compiled with a compiler version before 4.1.0 and which used the --optimize_with_debug option, this can be the result.  Link time optimization uses the original compilation options for each object file to determine a new combined option set for use during the link time optimization, and it seems to be missing the argument addition when merging them.

    Try recompiling any object files not already being compiled during the build shown (for example, included from any of the command files or libraries specified within the command files).

    I am trying to determine if this is a known issue or a bug.

  • Hi Wolf

    Our code size is hitting the max end on the G2153, so I'm relying on the -O4 optimization to size to get my code to fit.  Our fallback is to just continue to use  CCSv5.1.1

    I am not sure how to re-build the full toolchain that was provided by the CCSv5.2.0 to verify that all provided objects meet the 4.1.0 release level.  Is there an app note somewhere that provides direction on this?

    Thanks

  • I've verified this is a bug with other developers, and a fix is in progress.  I've opened defect SDSCM00044216 to track its status.  You can track this record in SDOWP.

    There are no workarounds for this issue except for disabling link time optimization completely.  To use link time optimization, you need to either use a pre-4.1.0 toolset for the entire build, or else 4.1.0 for the entire build; object files pre/post 4.1.0 cannot currently be mixed.  The fix will enable their mixing.  I have no release date for a 4.1.1 release.

    I don't know about an app note like you ask about.  It seems your best option at this time is to continue to use CCC 5.1.1 for the entire build.