<?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>LPCXpresso IDE中的主题 Re: using float throws error message while debugging</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578790#M23809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RA1981 on Sun Jun 05 02:07:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi StephenHawkings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Seems to me you need to copy "float.h" into your project's src folder.&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; I searched float.h and copied it from GCC newllib folder into src folder, doesn't help. I also searched float.c, but there are only small_printf_float.c and small_printf_nofloat.c available in LPCXpresso subfolders.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand why float.c is needed when simply using float variables. I assume float.c contains some special functions for float support. I don't know if it's simply a false project setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ralf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:57:46 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:57:46Z</dc:date>
    <item>
      <title>using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578788#M23807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RA1981 on Sat Jun 04 00:33:21 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;next pitfall for me :(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use float variables in a function. Builds successfully and program seems to work, however single stepping through the code shows up the following message when execution is done on a instruction accessing a float variable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Can't find a source file at "../src/float.c" &lt;BR /&gt;Locate the file or edit the source lookup path to include its location.&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;So, what is it this time what I'm missing? :confused:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ralf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578788#M23807</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578789#M23808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by StephenHawkings on Sat Jun 04 01:45:49 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems to me you need to copy "float.h" into your project's src folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StephenHawkings&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578789#M23808</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578790#M23809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RA1981 on Sun Jun 05 02:07:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi StephenHawkings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Seems to me you need to copy "float.h" into your project's src folder.&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; I searched float.h and copied it from GCC newllib folder into src folder, doesn't help. I also searched float.c, but there are only small_printf_float.c and small_printf_nofloat.c available in LPCXpresso subfolders.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand why float.c is needed when simply using float variables. I assume float.c contains some special functions for float support. I don't know if it's simply a false project setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ralf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578790#M23809</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578791#M23810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Sun Jun 05 02:11:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post an example that shows the problem? Zip up your project and attach it to you post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578791#M23810</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578792#M23811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RA1981 on Mon Jun 06 23:46:50 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi CodeRedSupport,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Can you post an example that shows the problem? Zip up your project and attach it to you post.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Attached is a ZIP file with a example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IDE version is LPCXpresso v3.6.2 [Build 279] [29/01/2011] on WinXP 32-Bit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Test is done on a LPCXpresso LPC1114 rev.A evaluation board&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Project setup is with CMSIS, no modifications (like changing used libs etc.).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the source code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;"&gt; &lt;PRE&gt;int main(void) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; float fTest;

&amp;nbsp;&amp;nbsp;&amp;nbsp; fTest = TestFloat();
&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1);

&amp;nbsp;&amp;nbsp;&amp;nbsp; return(0);
}

// test function
float TestFloat(void) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; float a, b;

&amp;nbsp;&amp;nbsp;&amp;nbsp; a = 1.3;
&amp;nbsp;&amp;nbsp;&amp;nbsp; b = 4.5;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return(a+b);
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;SPAN&gt;I tested it with debug configuration and single stepping through the code [F5].&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In function TestFloat() the variables a and b get's the values assigned&amp;nbsp; without error, but on 'return(a+b);' the error message shows up. The&amp;nbsp; variable fTest get's the correct value 5.8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope you can reproduce this on your machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[B]Note:[/B] This behaviour is a little different from the project where&amp;nbsp; this error message showed up. In the original project the error message&amp;nbsp; showed up on the first assignment of a value to a float variable.&amp;nbsp; Setting a breakpoint behind the float variable accesses and running to&amp;nbsp; breakpoint shows correct values when hovering the mouse over the&amp;nbsp; variable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I wonder if I'm simply missing something regarding using floats&amp;nbsp; (like including some neccessary headers or libs) or have a wrong project&amp;nbsp; configuration. Since I've used other IDEs, compilers and MCUs in the&amp;nbsp; past I assume that they've done something hidden regarding C and floats.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ralf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578792#M23811</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578793#M23812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Jun 07 02:51:45 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the test case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you may be aware, the LPC11xx does not contain floating point hardware, and so floating point operations are implemented via a software library function. Thus if we look at the disassembly for TestFloat() we can see a call to [FONT=Courier New][SIZE=1]__aeabi_fadd()[/SIZE][/FONT]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = 4.5;
0x0000031a &amp;lt;TestFloat+10&amp;gt;: ldr&amp;nbsp; r3, [pc, #28]&amp;nbsp;&amp;nbsp;&amp;nbsp; ; (0x338 &amp;lt;TestFloat+40&amp;gt;)
0x0000031c &amp;lt;TestFloat+12&amp;gt;: str&amp;nbsp; r3, [r7, #4]
&amp;nbsp;&amp;nbsp;&amp;nbsp; return(a+b);
0x0000031e &amp;lt;TestFloat+14&amp;gt;: ldr&amp;nbsp; r3, [r7, #0]
0x00000320 &amp;lt;TestFloat+16&amp;gt;: ldr&amp;nbsp; r2, [r7, #4]
0x00000322 &amp;lt;TestFloat+18&amp;gt;: adds r0, r3, #0
0x00000324 &amp;lt;TestFloat+20&amp;gt;: adds r1, r2, #0
0x00000326 &amp;lt;TestFloat+22&amp;gt;: bl&amp;nbsp;&amp;nbsp; 0x8ec &amp;lt;__aeabi_fadd&amp;gt;
0x0000032a &amp;lt;TestFloat+26&amp;gt;: adds r3, r0, #0
}
0x0000032c &amp;lt;TestFloat+28&amp;gt;: adds r0, r3, #0
0x0000032e &amp;lt;TestFloat+30&amp;gt;: mov&amp;nbsp; sp, r7
0x00000330 &amp;lt;TestFloat+32&amp;gt;: add&amp;nbsp; sp, #8
0x00000332 &amp;lt;TestFloat+34&amp;gt;: pop&amp;nbsp; {r7, pc}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;When you are stepping, you are actually using the "step in" operation. If you try to step into a function for which the image contains debug information, then the debugger will try to display the source code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears that the library object containing __aebi_fadd() has been built with the debug information enabled (whereas we would normally remove the debug information from the C library). Thus the debugger tries to display the source - which doesn't exist in your system (as we don't provide the library sources).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two simple workarounds here - use the "step over" rather than "step in" operation when you step the return statement. Or else if you end up with the error you are seeing in the debugger, then simply click "step out".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, sorry for the confusion this has caused you. This issue will be resolved in the next LPCXPresso release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578793#M23812</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: using float throws error message while debugging</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578794#M23813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RA1981 on Tue Jun 07 04:45:37 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi CodeRedSupport,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;It appears that the library object containing __aebi_fadd() has been&amp;nbsp; built with the debug information enabled (whereas we would normally&amp;nbsp; remove the debug information from the C library). Thus the debugger&amp;nbsp; tries to display the source - which doesn't exist in your system (as we&amp;nbsp; don't provide the library sources).&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, okay, so I didn't make anything wrong :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;There are two simple workarounds here - use the "step over" rather than&amp;nbsp; "step in" operation when you step the return statement. Or else if you&amp;nbsp; end up with the error you are seeing in the debugger, then simply click&amp;nbsp; "step out".&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, I'll use 'step over' when stepping through single instructions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Anyway, sorry for the confusion this has caused you. This issue will be resolved in the next LPCXPresso release.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No problem, glad to help finding issues and improving products ;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ralf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:57:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/using-float-throws-error-message-while-debugging/m-p/578794#M23813</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:57:49Z</dc:date>
    </item>
  </channel>
</rss>

