<?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 CPP project with RTC ISR functions -  Issue in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233482#M5276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using FRDM-KL25 board for our prototype developement. I created a C proejct in CW IDE 10.3 for RTC. I created the entire project in C first. &lt;STRONG&gt;RTC interrupts were handled by ISR routines in IVT&lt;/STRONG&gt;. This was successful with all functionalities working.&lt;STRONG&gt; But now am trying to migrate this C code to CPP code. I created a class RTC and moved all my functions into it. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; I didnt move the ISR function &lt;STRONG&gt;void __attribute__ ((interrupt)) RTC_Interrupt(void)&lt;/STRONG&gt; into the class. When I moved it into the class, it is showing&amp;nbsp; error "RTC_Interrupt was not declared in this scope". Please find my snapshots.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could anyone suggest me on how to move RTC ISR functions within the Class.? or how make reference of the ISR function in the class in the Interrupt Vector Table?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pic1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119191i7F25A6D18F7BE24F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic1.png" alt="pic1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pic2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119192iE0162252EEC0ABB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic2.png" alt="pic2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Mar 2013 09:36:55 GMT</pubDate>
    <dc:creator>anand-k</dc:creator>
    <dc:date>2013-03-21T09:36:55Z</dc:date>
    <item>
      <title>CPP project with RTC ISR functions -  Issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233482#M5276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using FRDM-KL25 board for our prototype developement. I created a C proejct in CW IDE 10.3 for RTC. I created the entire project in C first. &lt;STRONG&gt;RTC interrupts were handled by ISR routines in IVT&lt;/STRONG&gt;. This was successful with all functionalities working.&lt;STRONG&gt; But now am trying to migrate this C code to CPP code. I created a class RTC and moved all my functions into it. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; I didnt move the ISR function &lt;STRONG&gt;void __attribute__ ((interrupt)) RTC_Interrupt(void)&lt;/STRONG&gt; into the class. When I moved it into the class, it is showing&amp;nbsp; error "RTC_Interrupt was not declared in this scope". Please find my snapshots.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could anyone suggest me on how to move RTC ISR functions within the Class.? or how make reference of the ISR function in the class in the Interrupt Vector Table?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pic1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119191i7F25A6D18F7BE24F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic1.png" alt="pic1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pic2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119192iE0162252EEC0ABB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic2.png" alt="pic2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 09:36:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233482#M5276</guid>
      <dc:creator>anand-k</dc:creator>
      <dc:date>2013-03-21T09:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: CPP project with RTC ISR functions -  Issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233483#M5277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function must be static, put perhaps that is what RTC_ISR macro does.&lt;/P&gt;&lt;P&gt;Because it is static, it can only reference static members of the class OR you need have a global singleton object that the ISR references.&lt;/P&gt;&lt;P&gt;It may just be easier to make the actual ISR function not a member of the class, and just have it call in to a member function from the global singleton you will probably need anyway.&lt;/P&gt;&lt;P&gt;Also, if you are leaving it in the class you would have to say:&lt;/P&gt;&lt;P&gt;MyClass::RTC_Interrupt &lt;/P&gt;&lt;P&gt;but then the file using it would have to cpp as well for that to work.&lt;/P&gt;&lt;P&gt;You may have to fiddle a bit to get this right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to ask if the benefits of c++ are really going to out weight the price in size/speed and the issue of dynamic memory allocation, which is so important to effectively leveraging the advantages of c++.&lt;/P&gt;&lt;P&gt;You should also know that c++ is as not much used and therefore not as well tested as c.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 13:49:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233483#M5277</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-03-21T13:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: CPP project with RTC ISR functions -  Issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233484#M5278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand, how is the project going?&lt;/P&gt;&lt;P&gt;Keep us posted, we'd like to know :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 22:06:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233484#M5278</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-03-27T22:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: CPP project with RTC ISR functions -  Issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233485#M5279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any update? I want a working CPP demo on FRDM-KL25Z. But I want to use ARM GCC Embedded to build it. I have posted my thread on &lt;A href="https://community.nxp.com/message/349056"&gt;Re: Any G++ CPP demo project running on KL?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Allan K Liu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 11:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CPP-project-with-RTC-ISR-functions-Issue/m-p/233485#M5279</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-09-09T11:50:53Z</dc:date>
    </item>
  </channel>
</rss>

