<?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>MQX Software Solutions中的主题 Floating point in shell</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Floating-point-in-shell/m-p/304759#M9798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX 4.0 on Kinetis K60; hardware floating point; Ethernet port managed by RTCS task; Telnet task listens on port 23 and spawns Shell tasks on connect; all in the usual way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the commands that the shell executes need to use floating point. Other tasks also use floating point. To ensure FP registers are preserved on context switches my understanding is that all the tasks that use floating point must have the MQX_FLOATING_POINT_TASK attribute set. I have set this attribute on all my other tasks that use floating point, but there appears to be no way to get the RTCS Telnet task to set this attribute on the Shell tasks that it spawns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before I implement some nasty hack, has anyone come across this before? What is the cleanest way to get this attribute set on the spawned shell tasks?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2014 19:55:29 GMT</pubDate>
    <dc:creator>matthewkendall</dc:creator>
    <dc:date>2014-03-26T19:55:29Z</dc:date>
    <item>
      <title>Floating point in shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Floating-point-in-shell/m-p/304759#M9798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX 4.0 on Kinetis K60; hardware floating point; Ethernet port managed by RTCS task; Telnet task listens on port 23 and spawns Shell tasks on connect; all in the usual way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the commands that the shell executes need to use floating point. Other tasks also use floating point. To ensure FP registers are preserved on context switches my understanding is that all the tasks that use floating point must have the MQX_FLOATING_POINT_TASK attribute set. I have set this attribute on all my other tasks that use floating point, but there appears to be no way to get the RTCS Telnet task to set this attribute on the Shell tasks that it spawns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before I implement some nasty hack, has anyone come across this before? What is the cleanest way to get this attribute set on the spawned shell tasks?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 19:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Floating-point-in-shell/m-p/304759#M9798</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-03-26T19:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point in shell</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Floating-point-in-shell/m-p/304760#M9799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answering my own question in the hope that it might be useful to someone else:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There appears to be no clean way to get the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MQX_FLOATING_POINT_TASK &lt;/SPAN&gt; attribute set when the shell task is created, but it doesn't matter because there is a way to set this attribute later from within the task. It is not mentioned in the MQX user guide but the functions are listed in the reference manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13958660577068665" jivemacro_uid="_13958660577068665"&gt;
&lt;P&gt;_task_enable_fp();&lt;/P&gt;
&lt;P&gt;/* do floaty things */&lt;/P&gt;
&lt;P&gt;_task_disable_fp();&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, just do this from within the particular command that needs floating point, and it will temporarily set and clear the attribute on the shell task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 20:38:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Floating-point-in-shell/m-p/304760#M9799</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2014-03-26T20:38:10Z</dc:date>
    </item>
  </channel>
</rss>

