<?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 Design StudioのトピックRe: KDS and Preprocessor</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728354#M9411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I reproduced this problem on my side.and will report it to developer.&lt;/P&gt;&lt;P&gt;For the moment, please use the workaround you already found.&lt;/P&gt;&lt;P&gt;I will let you know as soon as I get any update from developer.&lt;/P&gt;&lt;P&gt;Thank you for bringing the problem to our attention.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 11:39:37 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2018-06-05T11:39:37Z</dc:date>
    <item>
      <title>KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728351#M9408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a problem with KDS and the pre-processor, I'm not sure if it's me mis-understanding the pre-proxcessor or a bug in the pre-processor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following defines:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; color: #0000ff;"&gt;#define TIME_ON_POWER &amp;nbsp; 20 // Value is in seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; color: #0000ff;"&gt;#define US_PER_S&amp;nbsp;&amp;nbsp; &amp;nbsp;(US_PER_MS * MS_PER_S)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; color: #0000ff;"&gt;#define S_TO_US(s)&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;(US_PER_S * s)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They're used in a function such as&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new, courier, monospace;"&gt;uint32_t variable = S_TO_US( 60 - TIME_ON_POWER );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my mind that should evaluate to 40,000,000 however when I look at it via the debugger it evalutles as 59,999,980&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To solve this I just put an extra pair of brackets around &lt;SPAN style="color: #0000ff; font-family: courier new, courier, monospace;"&gt;60 - TIME_ON_POWER&lt;/SPAN&gt;, this means&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;uint32_t variable = S_TO_US( (60 - TIME_ON_POWER) );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;evaulautes to 40,000,000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a problem with the KDS pre-processor or is my thinking/understanding flawed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 11:27:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728351#M9408</guid>
      <dc:creator>beng_</dc:creator>
      <dc:date>2018-05-29T11:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728352#M9409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do&amp;nbsp; you define macro US_PER_MS and MS_PER_S?&lt;BR /&gt;Can you please upload your demo project here thus we can check it directly?&lt;BR /&gt;Besides, please also send me your KDS version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 06:02:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728352#M9409</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2018-05-31T06:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728353#M9410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - I missed those defines.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new, courier, monospace;"&gt;#define US_PER_MS&amp;nbsp;&amp;nbsp; &amp;nbsp;1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new, courier, monospace;"&gt;#define MS_PER_S&amp;nbsp;&amp;nbsp; &amp;nbsp; 1000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 10:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728353#M9410</guid>
      <dc:creator>beng_</dc:creator>
      <dc:date>2018-05-31T10:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728354#M9411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I reproduced this problem on my side.and will report it to developer.&lt;/P&gt;&lt;P&gt;For the moment, please use the workaround you already found.&lt;/P&gt;&lt;P&gt;I will let you know as soon as I get any update from developer.&lt;/P&gt;&lt;P&gt;Thank you for bringing the problem to our attention.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:39:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728354#M9411</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2018-06-05T11:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728355#M9412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 13:42:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728355#M9412</guid>
      <dc:creator>beng_</dc:creator>
      <dc:date>2018-06-06T13:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: KDS and Preprocessor</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728356#M9413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ben,&lt;/P&gt;&lt;P&gt;You are welcome.&lt;/P&gt;&lt;P&gt;Jennie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 02:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/KDS-and-Preprocessor/m-p/728356#M9413</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2018-06-07T02:04:37Z</dc:date>
    </item>
  </channel>
</rss>

