Am 09.11.19 um 00:15 schrieb Samyukta Ramnath:
I want to add a CC1352P1_LAUNCHXL_TIRTOS.cmd file, which has been
added in the CCS linker command, but I am unable to include It in my
linker command. I tried the following things :
set(LINKER_SCRIPT "${LWIP_DIR}/CC1352P1_LAUNCHXL_TIRTOS.cmd")
set_target_properties(test.out PROPERTIES LINK_DEPENDS
${LWIP_DIR}/CC1352P1_LAUNCHXL_TIRTOS.cmd)
I have also tried passing it in with the cmake command as
>> cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain_ticomp.cmake
-DCMAKE_LINKER=../CC1352P1_LAUNCHXL_TIRTOS.cmd ..
None of these options helped.
This .cmd file has details about stack size, heap size, entry point etc.
As I said, the project using cgtools never went anywhere, so I never got
to the point that I needed to worry about linker command files, so I can
only give general hints, not a specific solution. That being said,
setting CMAKE_LINKER will not work, because that specifies the
executable to use as the linker. You could try adding
CC11352P1_LAUNCHXL_TIRTOS.cmd with add_link_options() or
target_link_options() like so:
target_link_options(<target> <path to CC1352P1_LAUNCHXL_TIRTOS.cmd>)
cmake should simply pass the command file through to the linker.
I would also like some clarification on where to add the linker
command --rom_model as when I add it to the CMAKE_EXE_LINKER_FLAGS
variable in the Toolchain.cmake file, my cmake hangs at “Detecting CXX
compiler ABI info”
CMAKE_EXE_LINKER_FLAGS should be the correct place to do this if you
want any target you build with this toolchain to use --rom_model.
However, if you are going to set this in the toolchain file, you should
set CMAKE_EXE_LINKER_FLAGS_INIT instead. This is because cmake will set
CMAKE_EXE_LINKER_FLAGS based on the contents of
CMAKE_EXE_LINKER_FLAGS_INIT and compiler-specific knowledge when it
encounters the project() command after reading the toolchain file.
Alternatively, you could try adding the --rom_model using the
add_link_options or target_link_options commands
--
*Dr. Eric Dönges*
Senior Software Engineer
MVTec Software GmbH | Arnulfstr. 205 | 80634 Munich | Germany
doen...@mvtec.com <mailto:musterm...@mvtec.com> | Tel: +49 89 457 695-0
| www.mvtec.com <http://www.mvtec.com>
Find our privacy policy here <https://www.mvtec.com/imprint>.
Sign up <https://www.mvtec.com/newsletter> for our MVTec Newsletter!
Geschäftsführer: Dr. Wolfgang Eckstein, Dr. Olaf Munkelt
Amtsgericht München HRB 114695
MVTec Software GmbH Logo
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake