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.

Followed printf instructions, got symbol "fputc" redefined error.

Other Parts Discussed in Thread: MSP430F5529, MSP-EXP430F5529LP

Hello,

    I'm using Code Composer Studio Version: 5.5.0.00077 with an MSP430F5529 LaunchPad, and am having a hard time getting printf() to work. I followed the instructions in this wiki page but when compiling there was an error:


#10056 symbol "fputc" redefined: first defined in "./Source/HAL/hal_msp-exp430f5529lp.obj"; redefined in "C:\ti\ccsv5\tools\compiler\msp430_4.2.4\lib\rts430_eabi.lib<fputc.obj>"

I thought that when re-defining a RTS function, the compiler would automatically use the user-created function? How do I get this to work?

Below is the output of the compiler:


**** Build of configuration Release for project Hello World 3 ****

"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k -j 8 all
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/command_processor.c'
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx.c'
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx_utilities.c'
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/main.c'
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/HAL/hal_msp-exp430f5529lp.c'
'Building file: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Common/printf.c'
'Invoking: MSP430 Compiler'
'Invoking: MSP430 Compiler'
'Invoking: MSP430 Compiler'
'Invoking: MSP430 Compiler'
'Invoking: MSP430 Compiler'
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/command_processor.pp" --obj_directory="Source"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/command_processor.c"
'Invoking: MSP430 Compiler'
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/dmx.pp" --obj_directory="Source"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx.c"
"C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/command_processor.c", line 54: warning #552-D: variable "mode" was set but never used
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/dmx_utilities.pp" --obj_directory="Source"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx_utilities.c"
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/main.pp" --obj_directory="Source"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/main.c"
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/HAL/hal_msp-exp430f5529lp.pp" --obj_directory="Source/HAL"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/HAL/hal_msp-exp430f5529lp.c"
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full --preproc_with_compile --preproc_dependency="Source/Common/printf.pp" --obj_directory="Source/Common"  "C:/svn/fw/Clients/Illuminonics/DMX_Processor/Common/printf.c"
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx_utilities.c'
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/command_processor.c'
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/dmx.c'
' '
' '
' '
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Application/main.c'
' '
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/Common/printf.c'
' '
'Finished building: C:/svn/fw/Clients/Illuminonics/DMX_Processor/HAL/hal_msp-exp430f5529lp.c'
' '
'Building target: Hello World 3.out'
'Invoking: MSP430 Linker'
"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/bin/cl430" -vmsp --abi=eabi --code_model=small --data_model=small -O3 --opt_for_speed=2 --advice:power_severity=suppress --advice:power="all" -g --relaxed_ansi --gcc --define=MSP_EXP430F5529LP --define=__MSP430F5529__ --define=xDEBUG_USCIA1RX_ISR --define=USE_STDIO --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=full -z -m"Hello World 3.map" --heap_size=512 --stack_size=260 --use_hw_mpy=F5 --cinit_hold_wdt=on -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.4/include" -i"C:/ti/ccsv5/ccs_base/msp430/lib/5xx_6xx_FRxx" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="Hello World 3_linkInfo.xml" --rom_model -o "Hello World 3.out"  "./Source/Common/printf.obj" "./Source/HAL/hal_msp-exp430f5529lp.obj" "./Source/main.obj" "./Source/dmx_utilities.obj" "./Source/dmx.obj" "./Source/command_processor.obj" "../lnk_msp430f5529.cmd" -l"libc.a"
<Linking>
error #10056: symbol "fputc" redefined: first defined in "./Source/HAL/hal_msp-exp430f5529lp.obj"; redefined in "C:\ti\ccsv5\tools\compiler\msp430_4.2.4\lib\rts430_eabi.lib<fputc.obj>"
error #10010: errors encountered during linking; "Hello World 3.out" not built

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

**** Build Finished ****