<?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 Link order for ksdk in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Link-order-for-ksdk/m-p/486333#M4275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was doing a project file cleanup on KDS 3.0.0 where I moved the lib_mqx.a and other static libraries over to the libraries section of the build settings (turns out that environmental variables aren't obeyed in the miscellaneous section but are in the library section).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normally the static libraries are linked first... E.g. -lmqx -lksdk_platform... then -lc -lgcc, etc.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I moved them over to the libs section, I inadvertently changed the order -lc -lgcc ... -lmqx &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This changed the binary output size and caused my application to crash with console error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12px;"&gt;assertion "fd == 0" failed: file "../Firmware/K64F/BSP/init_bsp.c", line 144, function: _bsp_nio_stdio_install&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; By moving mqx to the front, everything worked fine. Likely, two functions have same name and linker grabbed first one.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, thought I'd share to save anyone else the headache if they run into this.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2016 01:35:16 GMT</pubDate>
    <dc:creator>rajbatra</dc:creator>
    <dc:date>2016-01-13T01:35:16Z</dc:date>
    <item>
      <title>Link order for ksdk</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Link-order-for-ksdk/m-p/486333#M4275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was doing a project file cleanup on KDS 3.0.0 where I moved the lib_mqx.a and other static libraries over to the libraries section of the build settings (turns out that environmental variables aren't obeyed in the miscellaneous section but are in the library section).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normally the static libraries are linked first... E.g. -lmqx -lksdk_platform... then -lc -lgcc, etc.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I moved them over to the libs section, I inadvertently changed the order -lc -lgcc ... -lmqx &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This changed the binary output size and caused my application to crash with console error:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'courier new', courier; font-size: 12px;"&gt;assertion "fd == 0" failed: file "../Firmware/K64F/BSP/init_bsp.c", line 144, function: _bsp_nio_stdio_install&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; By moving mqx to the front, everything worked fine. Likely, two functions have same name and linker grabbed first one.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, thought I'd share to save anyone else the headache if they run into this.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2016 01:35:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/Link-order-for-ksdk/m-p/486333#M4275</guid>
      <dc:creator>rajbatra</dc:creator>
      <dc:date>2016-01-13T01:35:16Z</dc:date>
    </item>
  </channel>
</rss>

