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.
I'm getting error #10056: symbol "__TI_int59" redefined: first defined in "c:/ti/ccsv6/tools/compiler/msp430_4.3.3/lib/rts430x_lc_rd_eabi.lib<int59.obj>"; redefined in "..\common.lib<serial.obj>"
It seems that it is finding a default ISR in the runtime library before it finds the ISR in my library. My search path lists common.lib first, before any others. There must be another trick I'm missing. Any suggestions?
Be sure the linker sees common.lib before it sees the compiler RTS library. To affect the order in which the linker takes files from libraries, use the option --priority. If you use the option --reread_libs, remove it. You can read about those options in the ARM assembly tools manual.
Thanks and regards,
-George
Thanks for the reply. Linking with --priority and without --reread_libs doesn't change the result. The console output lists the "-l" for common.lib before any others, so it should be read first, I think. "-llibc.a" is the reference to the runtime, is it not?
--------------------------
'Invoking: MSP430 Linker'
"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/bin/cl430" -vmspx --abi=eabi --data_model=restricted -O2 -g --define=ISR_TIMING_SIGNALS --define=__MSP430F67691__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --single_inline --remove_hooks_when_inlining --printf_support=full --check_misra="required" -z -m"mdu.map" --heap_size=1000 --stack_size=3000 --use_hw_mpy=F5 --cinit_hold_wdt=on -i"C:/.../common/Debug" -i"C:/.../emeter-toolkit/Debug" -i"c:/ti/ccsv6/ccs_base/msp430/include" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/include" -i"c:/ti/ccsv6/ccs_base/msp430/lib/5xx_6xx_FRxx" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/lib" --priority --warn_sections --display_error_number --diag_wrap=off --xml_link_info="mdu_linkInfo.xml" --rom_model -o "mdu.out" "./src/calibration.obj" "./src/functional_test.obj" "./src/main.obj" "./src/mdu-background.obj" "./src/mdu-foreground.obj" "./src/mdu_console.obj" "./src/mdu_shell.obj" "./src/opto-port.obj" "../lnk_msp430f67691.cmd" -l"C:\..\common.lib" -l"C:\...\IEC60730.lib" -l"libmath.a" -l"libc.a" -l"C:\...\ssm.lib"
<Linking>
error #10056: symbol "__TI_int59" redefined: first defined in "c:/ti/ccsv6/tools/compiler/msp430_4.3.3/lib/rts430x_lc_rd_eabi.lib<int59.obj>"; redefined in "C:\...\common.lib<serial.obj>"
------------------------------------
I've selected <automatic> for runtime support library in the CCS General properties page.
Yes, libc.a is the shorthand for the compiler's RTS library.
Perhaps one or the other libraries defines __TI_int59 in the same section as a different symbol that you really do need, and __TI_int59 gets dragged along for the ride. This isn't supposed to be the case, but it's possible. Where does common.lib come from? Does it define any other interrupt handler functions?
Great suggestion. I have other ISRs in another file. It is referenced in the linker command as an ".obj" file, which is listed before common.lib. This is probably the cause of the problem. How do I fix it?
"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/bin/cl430" -vmspx --abi=eabi --data_model=restricted -O2 -g --define=ISR_TIMING_SIGNALS --define=__MSP430F67691__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --single_inline --remove_hooks_when_inlining --printf_support=full --check_misra="required" -z -m"mdu.map" --heap_size=1000 --stack_size=3000 --use_hw_mpy=F5 --cinit_hold_wdt=on -i"C:/.../common/Debug" -i"C:/.../emeter-toolkit/Debug" -i"c:/ti/ccsv6/ccs_base/msp430/include" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/include" -i"c:/ti/ccsv6/ccs_base/msp430/lib/5xx_6xx_FRxx" -i"c:/ti/ccsv6/tools/compiler/msp430_4.3.3/lib" --priority --warn_sections --display_error_number --diag_wrap=off --xml_link_info="mdu_linkInfo.xml" --rom_model -o "mdu.out" "./src/calibration.obj" "./src/functional_test.obj" "./src/main.obj" "./src/mdu-background.obj" "./src/mdu-foreground.obj" "./src/mdu_console.obj" "./src/mdu_shell.obj" "./src/opto-port.obj" "../lnk_msp430f67691.cmd" -l"C:\..\common.lib" -l"C:\...\IEC60730.lib" -l"libmath.a" -l"libc.a" -l"C:\...\ssm.lib"
The only way to work out the problem is to see your project. Please attach it to your next post.
Thanks and regards,
-George
We need the entire CCS project. Are you willing to send it just to me?
Thanks and regards,
-George
Under CCS Properties -> CCS Build -> Link Order you can specify the order objects are passed to the linker.Carl Hagenmaier said:What knob do I turn to change the order of the "objs" in the linker command?
Use the "Add..." button to specify for which object(s) the order must be controlled.
Your screen shots are not visible.Carl Hagenmaier said:The "working" versionis the same as the non-working version
Do you mean that on the "working" and "non-working" versions the Link Order in the CCS project properties is empty?
The reason is that on a newly created project the Link Order is empty and CCS choses the order files are passed on the linker command line. The issue I have seen is that for reasons not understood, compiling the same project on two different machines can sometimes cause CCS to change the order files are passed on the linker command line.
If the CCS chosen order causes the link to fail, using the Link Order in the CCS project properties to force the order can avoid the link error.