[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Using CMake with TI armcl and armar
From:       Eric Doenges <doenges () mvtec ! com>
Date:       2019-11-11 8:18:41
Message-ID: 1cd39067-e037-20d3-0132-fdb1430be63d () mvtec ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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
doenges@mvtec.com <mailto:mustermann@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

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 09.11.19 um 00:15 schrieb Samyukta
      Ramnath:<br>
    </div>
    <blockquote type="cite"
      cite="mid:FE21C6CA-D19F-4E6B-A33E-A9C920269E05@axon.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
tt
	{mso-style-priority:99;
	font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-priority:99;
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;}
span.EmailStyle22
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">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 :
        <o:p></o:p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">set(LINKER_SCRIPT
          "${LWIP_DIR}/CC1352P1_LAUNCHXL_TIRTOS.cmd")<o:p></o:p></p>
        <p class="MsoNormal">set_target_properties(test.out PROPERTIES
          LINK_DEPENDS ${LWIP_DIR}/CC1352P1_LAUNCHXL_TIRTOS.cmd)<o:p></o:p></p>
        <p class="MsoNormal">I have also tried passing it in with the
          cmake command as <o:p>
          </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">&gt;&gt; cmake
          -DCMAKE_TOOLCHAIN_FILE=../Toolchain_ticomp.cmake
          -DCMAKE_LINKER=../CC1352P1_LAUNCHXL_TIRTOS.cmd ..<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">None of these options helped. <o:p></o:p></p>
        <p class="MsoNormal">This .cmd file has details about stack
          size, heap size, entry point etc.
        </p>
      </div>
    </blockquote>
    <p>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:</p>
    <p class="MsoNormal">target_link_options(&lt;target&gt; &lt;path to
      CC1352P1_LAUNCHXL_TIRTOS.cmd&gt;)<o:p> <br>
      </o:p></p>
    <p class="MsoNormal"><o:p><br>
      </o:p></p>
    <p class="MsoNormal"><o:p>cmake should simply pass the command file
        through to the linker.<br>
      </o:p></p>
    <blockquote type="cite"
      cite="mid:FE21C6CA-D19F-4E6B-A33E-A9C920269E05@axon.com">
      <div class="WordSection1">
        <p class="MsoNormal">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”</p>
      </div>
    </blockquote>
    <p>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. <br>
    </p>
    <p>Alternatively, you could try adding the --rom_model using the
      add_link_options or target_link_options commands</p>
    <div class="moz-signature">-- <br>
      <div style="width:480px; text-align: left; font-family: Arial,
        Helvetica, sans-serif;">
        <p style="color: #062d64; font-size: 14px; text-align: left;
          font-family: Arial, Helvetica, sans-serif;">
          <b>Dr. Eric Dönges</b>
          <br>
          Senior Software Engineer
        </p>
        <p style="color: #062d64; font-size: 12px; text-align: left;
          font-family: Arial, Helvetica, sans-serif;">MVTec Software
          GmbH | Arnulfstr. 205 | 80634 Munich | Germany
          <br>
          <a style="font-size: 12px; font-family: Arial, Helvetica,
            sans-serif; color: #062d64;"
            href="mailto:mustermann@mvtec.com">doenges@mvtec.com</a> |
          Tel: +49 89 457 695-0 | <a style="font-size: 12px;
            font-family: Arial, Helvetica, sans-serif; color: #062d64;"
            href="http://www.mvtec.com">www.mvtec.com</a>
          <br>
        </p>
        <p>
          <span style="font-size: 12px; font-family: Arial, Helvetica,
            sans-serif; color: #062d64;">Find our privacy policy <a
              style="font-size: 12px; font-family: Arial, Helvetica,
              sans-serif; color: #062d64;"
              href="https://www.mvtec.com/imprint">here</a>.</span> </p>
        <p style="color: #062d64; font-size: 12px; text-align: left;
          font-family: Arial, Helvetica, sans-serif;"><img
src="https://mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/newsletter-icon.png"
            valign="bottom" width="16" height="16"> <a style="font-size:
            12px; font-family: Arial, Helvetica, sans-serif; color:
            #062d64; font-weight: bold;"
            href="https://www.mvtec.com/newsletter">Sign up</a> for our
          MVTec Newsletter!</p>
        <p style="margin: 0px; color: #666; font-size: 12px; text-align:
          left; font-family: Arial, Helvetica, sans-serif;">Geschäftsführer:
          Dr. Wolfgang Eckstein, Dr. Olaf Munkelt<br>
          Amtsgericht München HRB 114695</p>
        <p style="margin: 0px; color: #666; font-size: 12px; text-align:
          left; font-family: Arial, Helvetica, sans-serif;"> </p>
        <img
src="https://www.mvtec.com/fileadmin/Redaktion/newsletter/mail-signature/mvtec-logo-line.png"
          alt="MVTec Software GmbH Logo"></div>
    </div>
  </body>
</html>


-- 

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic