<div dir="ltr">Hi Falk,<br><br>the TI Docs contains the following line:<br>cl6x --run_linker {--rom_model | --ram_model} filenames<br>[options] [--output_file= name.out] --library= library [lnk.cmd]<br><br>therefore i'd suggest the following changes:<br>set(CMAKE_C_LINK_EXECUTABLE   "<CMAKE_C_COMPILER>   --run_linker <OBJECTS> <CMAKE_C_LINK_FLAGS>   <LINK_FLAGS> --map_file=<TARGET>.map --output_file=<TARGET> <LINK_LIBRARIES>")<br>set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_ASM_COMPILER> --run_linker <OBJECTS> <CMAKE_ASM_LINK_FLAGS> <LINK_FLAGS> --map_file=<TARGET>.map --output_file=<TARGET> <LINK_LIBRARIES>")<br>set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> --run_linker <OBJECTS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> --map_file=<TARGET>.map --output_file=<TARGET> <LINK_LIBRARIES>")<br><br>I'm using it on a c++ project, linker language is c, the c/c++ line above works for me. I didn't test ASM, but i guess that's straight forward.<br><br>Maybe Alex Neundorf  can do this change .<br><br>Regards,<br> Florian<br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-28 8:15 GMT+02:00 Tristram, Falk <span dir="ltr"><<a href="mailto:falk.tristram@cognex.com" target="_blank">falk.tristram@cognex.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal">Hi all,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US">before creating a bug report about this problem, I first want to get feedback here.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I have created a CMake build system for a whole bunch of embedded targets all working fine.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Now I ran into a strange problem related to the tms470_5.0.1.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Some of the symbols are just dropped by linker (optimized out).<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I pinned down the problem to the “TI-C.cmake”.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><OBJECTS> is the last entry.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">In my case OBJECTS just consists out of one file “main.c.obj”.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Changing the order just works fine, as follows:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> <LINK_FLAGS>")<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Now here is my question:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Is there any specific reason why <OBJECTS> comes as last parameter?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Could you change the order for future versions?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Note: I am still checking/testing the impact of the changed order to our other TI-C build systems.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Falk<u></u><u></u></span></p></div></div><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div></div></div>