<?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>Kinetis Software Development KitのトピックRe: K63F: no FPU?</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423241#M2233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had this issue in the past. Have you confirmed it is not a hardfault caused by the FPU being accessed but not initialised?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is initialised at the start of SystemInit(). See:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#if ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp; SCB-&amp;gt;CPACR |= ((3UL &amp;lt;&amp;lt; 10*2) | (3UL &amp;lt;&amp;lt; 11*2));&amp;nbsp;&amp;nbsp;&amp;nbsp; /* set CP10, CP11 Full Access */&lt;/P&gt;&lt;P&gt;#endif /* ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1)) */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two constants are defined in core_cm4.h based on your complier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Nov 2015 11:18:00 GMT</pubDate>
    <dc:creator>gabrielharrison</dc:creator>
    <dc:date>2015-11-19T11:18:00Z</dc:date>
    <item>
      <title>K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423240#M2232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Everywhere I look around I see K63F's Cortex M4 has an FPU. But there are two very disturbing facts:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. KSDK uses this flag to compile itself for K63F:&lt;/P&gt;&lt;P&gt;-mfloat-abi=soft&lt;/P&gt;&lt;P&gt;This makes gcc generate software-floating point instructions, e.g. emulates the FPU (at a huge size and speed penalty).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. If I use these compile options to utilize the FPU, the generated code simply doesn't run (I don't even see a single line of text on my serial console, but haven't gone deeper into the details):&lt;/P&gt;&lt;P&gt;-mfloat-abi=softfp -mfpu=fpv4-sp-d16&lt;/P&gt;&lt;P&gt;These are about to turn on FPU usage.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's very suspicious to me that the information sources are wrong, and K63F in fact &lt;STRONG&gt;doesn't have&lt;/STRONG&gt;&lt;STRONG&gt; an FPU.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some confirmation.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(However, I've checked the KSDK build flags for K64F too, and it includes -mfloat-abi=hard and &lt;SPAN style="font-size: 18.8888893127441px;"&gt;-mfpu=fpv4-sp-d16, so it should have a working FPU.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 07:42:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423240#M2232</guid>
      <dc:creator>tselmeci</dc:creator>
      <dc:date>2015-11-19T07:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423241#M2233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had this issue in the past. Have you confirmed it is not a hardfault caused by the FPU being accessed but not initialised?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is initialised at the start of SystemInit(). See:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#if ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp; SCB-&amp;gt;CPACR |= ((3UL &amp;lt;&amp;lt; 10*2) | (3UL &amp;lt;&amp;lt; 11*2));&amp;nbsp;&amp;nbsp;&amp;nbsp; /* set CP10, CP11 Full Access */&lt;/P&gt;&lt;P&gt;#endif /* ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1)) */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two constants are defined in core_cm4.h based on your complier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 11:18:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423241#M2233</guid>
      <dc:creator>gabrielharrison</dc:creator>
      <dc:date>2015-11-19T11:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423242#M2234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using KSDK-1.2.0. The startup code compile flags are located in &lt;SPAN style="font-family: 'courier new', courier;"&gt;lib/ksdk_startup_lib/armgcc/K63F12/CMakeLists.txt:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CMAKE_C_FLAGS_RELEASE&lt;/SPAN&gt;. This is the default: "&lt;SPAN style="font-family: 'courier new', courier;"&gt;...-mcpu=cortex-m4&amp;nbsp; -mfloat-abi=soft...&lt;/SPAN&gt;" so &lt;SPAN style="text-decoration: underline;"&gt;Freescale people have set it to emit softfloat instructions&lt;/SPAN&gt; (doesn't make use of the FPU).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For K64F: &lt;SPAN style="font-size: 18.8888893127441px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;lib/ksdk_startup_lib/armgcc/K64F12/CMakeLists.txt: CMAKE_C_FLAGS_RELEASE: "...-mcpu=cortex-m4&amp;nbsp; -mfloat-abi=hard&amp;nbsp; -mfpu=fpv4-sp-d16..."&lt;/SPAN&gt;, so it emits FPU instructions by default.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18.8888893127441px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SystemInit(...)&lt;/SPAN&gt; for K63F is in &lt;SPAN style="font-family: 'courier new', courier;"&gt;platform/devices/MK63F12/startup/system_MK63F12.c&lt;/SPAN&gt;. With KSDK's default settings &lt;SPAN style="font-family: 'courier new', courier;"&gt;__FPU_USED__ == 0&lt;/SPAN&gt;. Why? For the answer see &lt;SPAN style="font-family: 'courier new', courier;"&gt;platform/CMSIS/Include/core_cm4.h&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;#elif defined ( __GNUC__ )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; #if defined (__VFP_FP__) &amp;amp;&amp;amp; !defined(__SOFTFP__)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if (__FPU_PRESENT == 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define __FPU_USED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define __FPU_USED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; #else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define __FPU_USED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; #endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since gcc is passed &lt;SPAN style="font-family: 'courier new', courier;"&gt;-mfloat-abi=soft, __SOFTFP__&lt;/SPAN&gt; is defined and thus &lt;SPAN style="font-family: 'courier new', courier;"&gt;__FPU_USED&lt;/SPAN&gt; becomes 0, so the code in &lt;SPAN style="font-family: 'courier new', courier;"&gt;SystemInit(...)&lt;/SPAN&gt; doesn't compile/execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've modified KSDK to use &lt;SPAN style="font-family: 'courier new', courier;"&gt;-mfloat-abi=softfp&lt;/SPAN&gt;, so the code in &lt;SPAN style="font-family: 'courier new', courier;"&gt;SystemInit(...)&lt;/SPAN&gt; compiles and executes. Moreover I've recompiled my whole project with &lt;SPAN style="font-family: 'courier new', courier;"&gt;-mfloat-abi=softfp&lt;/SPAN&gt; and the result is the same: freezes on startup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's little bit like that KSDK developers at Freescale know that K63F hasn't got an FPU (or it's simply non-functional), but they haven't notified the tech-writer guys about this. Somebody correct me if I'm wrong, please!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 12:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423242#M2234</guid>
      <dc:creator>tselmeci</dc:creator>
      <dc:date>2015-11-19T12:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423243#M2235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens when you compile with the default H/W FPU settings in CMakeLists.txt but edit SystemInit() to always include the FPU setup line " SCB-&amp;gt;CPACR |= ((3UL &amp;lt;&amp;lt; 10*2) | (3UL &amp;lt;&amp;lt; 11*2));&amp;nbsp;&amp;nbsp;&amp;nbsp; /* set CP10, CP11 Full Access */"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 15:40:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423243#M2235</guid>
      <dc:creator>gabrielharrison</dc:creator>
      <dc:date>2015-11-19T15:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423244#M2236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tried it yet and I don't see any point in doing so. In my opinion if K63F really had an FPU, then KSDK (developed by Freescale guys) would have an appropriate setting. Now it's set to emit soft-float instructions. Anyway, enabling the FPU and using soft-float instructions doesn't make too much sense to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not the first time I see that Freescale HW documentation is imprecise. Would be fine if somebody from Freescale confirm my finding or give me the explanation about the FPU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 08:51:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423244#M2236</guid>
      <dc:creator>tselmeci</dc:creator>
      <dc:date>2015-11-23T08:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423245#M2237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this exact code in a different IDE (IAR) for our chip, the K60F via the KSDK and if is working fine so it is most likely a configuration issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 09:18:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423245#M2237</guid>
      <dc:creator>gabrielharrison</dc:creator>
      <dc:date>2015-11-23T09:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423246#M2238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In KSDK-1.2.0 K60D has the following settings:&lt;/P&gt;&lt;P&gt;-mcpu=cortex-m4&lt;/P&gt;&lt;P&gt;-mfloat-abi=soft&lt;/P&gt;&lt;P&gt;-mthumb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically appear to be the same as K63F. You you've patched KSDK to execute the FPU initialization routine despite the preprocessor macros. However, you still make KSDK emit soft-float instructions instead of real FPU instructions. I can imagine that K60/K63 have a broken FPU, which passed the initialization, but when it comes to executing an instruction, fails...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 10:17:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423246#M2238</guid>
      <dc:creator>tselmeci</dc:creator>
      <dc:date>2015-11-23T10:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: K63F: no FPU?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423247#M2239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using IAR so the compiler is different but by default the FPU module is turned off as well in the project settings. All I did was choose Hardware FPU in the project settings which defines __ARMVFP__. No editing of the KSDK was needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 11:36:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K63F-no-FPU/m-p/423247#M2239</guid>
      <dc:creator>gabrielharrison</dc:creator>
      <dc:date>2015-11-23T11:36:04Z</dc:date>
    </item>
  </channel>
</rss>

