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.

Link fails with -O4 and --small_enum

Other Parts Discussed in Thread: MSP430F2618

I get the following link errors when compiling with -O4 and --small_enum options.  Note: the build succeeds with -O3 and --small_enum.

<Linking>
remark #10205-D: automatic RTS selection:  linking in "rts430x.lib" in place of
   index library "libc.a"
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.
error: option --enum_type=unpacked is set in "copy_decompress_none.c", and is

>> Compilation failure
   incompatible with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "copy_decompress_rle.c", and is
   incompatible with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "copy_zero_init.c", and is
   incompatible with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "delete.cpp", and is incompatible
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "_lock.c", and is incompatible

>> Compilation failure

>> Compilation failure
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "memory.c", and is incompatible
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "pre_init.c", and is incompatible
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "sinit.c", and is incompatible
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "atexit.c", and is incompatible
   with the previously seen option --enum_type=packed
error: option --enum_type=unpacked is set in "memcpy.c", and is incompatible
   with the previously seen option --enum_type=packed
fatal error #10192: Failed linktime optimization
gmake: *** [ccs-hello-world.out] Error 1

**** Build Finished ****

Shouldn't the run-time library get rebuilt with the --small_enum option ??  Would that fix the problem ??

  • Brendan,

    Could you copy the full output of the CCS build console to a text file and attach it here, so we can see the full list of options/exact command line used for the compile and link step? Thanks!


  • **** Build of configuration Debug for project ccs-hello-world ****

    "C:\\ti-5.3.0.00090\\ccsv5\\utils\\bin\\gmake" all
    'Building file: ../hello.cpp'
    'Invoking: MSP430 Compiler'
    "C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/bin/cl430" -vmspx --abi=coffabi -O4 -g --include_path="C:/ti-5.3.0.00090/ccsv5/ccs_base/msp430/include" --include_path="C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/include" --advice:power="all" --gen_acp_xref --cpp_default --gcc --define=__MSP430F2618__ --diag_warning=225 --display_error_number --issue_remarks --small_enum --plain_char=unsigned --printf_support=minimal --preproc_with_compile --preproc_dependency="hello.pp"  "../hello.cpp"
    "../hello.cpp", line 52: remark #880-D: parameter "buf" was never referenced
    "../hello.cpp", line 52: remark #880-D: parameter "count" was never referenced
    "../hello.cpp", line 53: remark #880-D: parameter "buf" was never referenced
    "../hello.cpp", line 53: remark #880-D: parameter "count" was never referenced
    'Finished building: ../hello.cpp'
    ' '
    'Building target: ccs-hello-world.out'
    'Invoking: MSP430 Linker'
    "C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/bin/cl430" -vmspx --abi=coffabi -O4 -g --advice:power="all" --gen_acp_xref --cpp_default --gcc --define=__MSP430F2618__ --diag_warning=225 --display_error_number --issue_remarks --small_enum --plain_char=unsigned --printf_support=minimal -z --stack_size=80 -m"ccs-hello-world.map" --heap_size=80 --use_hw_mpy=16 -i"C:/ti-5.3.0.00090/ccsv5/ccs_base/msp430/include" -i"C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/lib" -i"C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/include" --reread_libs --warn_sections --display_error_number --issue_remarks --rom_model -o "ccs-hello-world.out"  "./hello.obj" -l"libc.a" "../lnk_msp430f2618.cmd"
    <Linking>
    remark #10205-D: automatic RTS selection:  linking in "rts430x.lib" in place of
       index library "libc.a"
    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.
    error: option --enum_type=unpacked is set in "copy_decompress_none.c", and is
       incompatible with the previously seen option --enum_type=packed
    error: option --enum_type=unpacked is set in "copy_decompress_rle.c", and is

    >> Compilation failure

    >> Compilation failure
       incompatible with the previously seen option --enum_type=packed
    error: option --enum_type=unpacked is set in "copy_zero_init.c", and is

    >> Compilation failure
       incompatible with the previously seen option --enum_type=packed
    error: option --enum_type=unpacked is set in "_lock.c", and is incompatible
       with the previously seen option --enum_type=packed
    error: option --enum_type=unpacked is set in "pre_init.c", and is incompatible
       with the previously seen option --enum_type=packed
    error: option --enum_type=unpacked is set in "memcpy.c", and is incompatible
       with the previously seen option --enum_type=packed
    fatal error #10192: Failed linktime optimization
    gmake: *** [ccs-hello-world.out] Error 1

    **** Build Finished ****

  • The previous console output is with optimization level 4 (which fails).  Below is with optimization level 3, which completes the build, but I'm wondering if there would be some problems between the compiler and linking the rts ??


    **** Build of configuration Debug for project ccs-hello-world ****

    "C:\\ti-5.3.0.00090\\ccsv5\\utils\\bin\\gmake" all
    'Building file: ../hello.cpp'
    'Invoking: MSP430 Compiler'
    "C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/bin/cl430" -vmspx --abi=coffabi -O3 -g --include_path="C:/ti-5.3.0.00090/ccsv5/ccs_base/msp430/include" --include_path="C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/include" --advice:power="all" --gen_acp_xref --cpp_default --gcc --define=__MSP430F2618__ --diag_warning=225 --display_error_number --issue_remarks --small_enum --plain_char=unsigned --printf_support=minimal --preproc_with_compile --preproc_dependency="hello.pp"  "../hello.cpp"
    "../hello.cpp", line 52: remark #880-D: parameter "buf" was never referenced
    "../hello.cpp", line 52: remark #880-D: parameter "count" was never referenced
    "../hello.cpp", line 53: remark #880-D: parameter "buf" was never referenced
    "../hello.cpp", line 53: remark #880-D: parameter "count" was never referenced
    'Finished building: ../hello.cpp'
    ' '
    'Building target: ccs-hello-world.out'
    'Invoking: MSP430 Linker'
    "C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/bin/cl430" -vmspx --abi=coffabi -O3 -g --advice:power="all" --gen_acp_xref --cpp_default --gcc --define=__MSP430F2618__ --diag_warning=225 --display_error_number --issue_remarks --small_enum --plain_char=unsigned --printf_support=minimal -z --stack_size=80 -m"ccs-hello-world.map" --heap_size=80 --use_hw_mpy=16 -i"C:/ti-5.3.0.00090/ccsv5/ccs_base/msp430/include" -i"C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/lib" -i"C:/ti-5.3.0.00090/ccsv5/tools/compiler/msp430_4.1.3/include" --reread_libs --warn_sections --display_error_number --issue_remarks --rom_model -o "ccs-hello-world.out"  "./hello.obj" -l"libc.a" "../lnk_msp430f2618.cmd"
    <Linking>
    remark #10205-D: automatic RTS selection:  linking in "rts430x.lib" in place of
       index library "libc.a"
    remark #10371-D: (ULP 1.1) Detected no uses of low power mode state changes
    "../lnk_msp430f2618.cmd", line 120: warning #10374-D: Interrupt vector
       "RESERVED0" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 121: warning #10374-D: Interrupt vector
       "RESERVED1" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 122: warning #10374-D: Interrupt vector
       using LPMx or _bis_SR_register() or __low_power_mode_x() in this project.
       "RESERVED2" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 123: warning #10374-D: Interrupt vector
       "RESERVED3" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 124: warning #10374-D: Interrupt vector
       "RESERVED4" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 125: warning #10374-D: Interrupt vector
       "RESERVED5" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 126: warning #10374-D: Interrupt vector
       "RESERVED6" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 127: warning #10374-D: Interrupt vector
       "RESERVED7" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 128: warning #10374-D: Interrupt vector
       "RESERVED8" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 129: warning #10374-D: Interrupt vector
       "RESERVED9" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 130: warning #10374-D: Interrupt vector
       "RESERVED10" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 131: warning #10374-D: Interrupt vector
       "RESERVED11" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 132: warning #10374-D: Interrupt vector
       "RESERVED12" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 133: warning #10374-D: Interrupt vector
       "RESERVED13" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 134: warning #10374-D: Interrupt vector "DAC12"
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 135: warning #10374-D: Interrupt vector "DMA"
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 136: warning #10374-D: Interrupt vector
       "USCIAB1TX" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 137: warning #10374-D: Interrupt vector
       "USCIAB1RX" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 138: warning #10374-D: Interrupt vector "PORT1"
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 139: warning #10374-D: Interrupt vector "PORT2"
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 140: warning #10374-D: Interrupt vector
    'Finished building target: ccs-hello-world.out'
       "RESERVED20" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 141: warning #10374-D: Interrupt vector "ADC12"
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 142: warning #10374-D: Interrupt vector
       "USCIAB0TX" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 143: warning #10374-D: Interrupt vector
       "USCIAB0RX" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 144: warning #10374-D: Interrupt vector
       "TIMERA1" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 145: warning #10374-D: Interrupt vector
       "TIMERA0" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 146: warning #10374-D: Interrupt vector "WDT"
    ' '
       does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 147: warning #10374-D: Interrupt vector
       "COMPARATORA" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 148: warning #10374-D: Interrupt vector
       "TIMERB1" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 149: warning #10374-D: Interrupt vector
       "TIMERB0" does not have an interrupt handler routine.
    "../lnk_msp430f2618.cmd", line 150: warning #10374-D: Interrupt vector "NMI"
       does not have an interrupt handler routine.

    **** Build Finished ****

  • Brendan,

    Thanks for attaching the build output. I was able to duplicate this behavior and it appears to be an incompatibility when using --small_enum with -o4. I have filed a bug report so it can be analyzed and fixed for a future release. The tracking# is SDSCM00045923 and you may track its status using the SDOWP link in my signature.