<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Link-time optimizer ( -flto) in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475826#M5290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it works well for me, but I'm using FreeRTOS. Check all the warnings, and make sure that you have built all object files with -flto (remove the 'Debug' folder to have a clean state before building).&lt;/P&gt;&lt;P&gt;I have seen problems in startup code if the objects (e.g. __SP_INIT) do not have the same size in all declarations.&lt;/P&gt;&lt;P&gt;The other thing is that I moved up to the latest GNU ARM Embedded (launchpad) tools 5.2 2015 q4 (see &lt;A href="http://mcuoneclipse.com/2014/07/11/switching-arm-gnu-tool-chain-and-libraries-in-kinetis-design-studio/" title="http://mcuoneclipse.com/2014/07/11/switching-arm-gnu-tool-chain-and-libraries-in-kinetis-design-studio/"&gt;Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio | MCU on Eclipse&lt;/A&gt; ). LTO had some issues afaik in older ARM toolchains, so this might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jan 2016 06:11:21 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2016-01-30T06:11:21Z</dc:date>
    <item>
      <title>Link-time optimizer ( -flto)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475825#M5289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone use link-time optimizer in KDS?&amp;nbsp; Does the optimizer work in MQX? I tried to use it by setting it in the Optimization (C/C++ Build - Settings) and at the C++ Linker, the size of flash image reduced quite a bit but it did not run at all ( stuck at toolchain_startup function). Any suggestion is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 21:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475825#M5289</guid>
      <dc:creator>robertnguyen</dc:creator>
      <dc:date>2016-01-29T21:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Link-time optimizer ( -flto)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475826#M5290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it works well for me, but I'm using FreeRTOS. Check all the warnings, and make sure that you have built all object files with -flto (remove the 'Debug' folder to have a clean state before building).&lt;/P&gt;&lt;P&gt;I have seen problems in startup code if the objects (e.g. __SP_INIT) do not have the same size in all declarations.&lt;/P&gt;&lt;P&gt;The other thing is that I moved up to the latest GNU ARM Embedded (launchpad) tools 5.2 2015 q4 (see &lt;A href="http://mcuoneclipse.com/2014/07/11/switching-arm-gnu-tool-chain-and-libraries-in-kinetis-design-studio/" title="http://mcuoneclipse.com/2014/07/11/switching-arm-gnu-tool-chain-and-libraries-in-kinetis-design-studio/"&gt;Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio | MCU on Eclipse&lt;/A&gt; ). LTO had some issues afaik in older ARM toolchains, so this might help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jan 2016 06:11:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475826#M5290</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-01-30T06:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Link-time optimizer ( -flto)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475827#M5291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is important to mark ISRs and other functions that the compiler may think are never called with the attribute USED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define ATTR_USED __attribute__ ((used))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggressive removal of code can remove things that are actually used, however the compiler may not be able to track their usage to know they are used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This in a way defeats what LTO was meant to do, remove dead code.&amp;nbsp; Comes down to proper code hygiene.&lt;/P&gt;&lt;P&gt;There should be no dead code that needs removed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also GCC 5.0 and GCC 5.1 are broken and shall not be used.&amp;nbsp; Use 4.8/4.9 or 5.2q4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 14:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475827#M5291</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2016-02-01T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Link-time optimizer ( -flto)</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475828#M5292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice. I removed lto option in bsp (MQX) project and it seems to works (KDS 3.1, MQX 4.2, arm gcc 4.8.4).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 17:33:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Link-time-optimizer-flto/m-p/475828#M5292</guid>
      <dc:creator>robertnguyen</dc:creator>
      <dc:date>2016-02-01T17:33:48Z</dc:date>
    </item>
  </channel>
</rss>

