<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックProblems with C++ and Codewarrior</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Problems-with-C-and-Codewarrior/m-p/239774#M11393</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert to C++&amp;nbsp; a project made in C, but I am having some problems.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested them with Codewarior 10.2 on linux and Codewarrior 10.3 on Windows (Professional Edition license) with the same results on both of them. I have also tested them on our own board and on the demoboard with the same results.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are developing it with Coldfire V1 MCF51AC256A.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I'm porting a function that it is working on C, to C++ and it doesn't work as expected. That funcion enables a Fextimer to generate a periodic interrupt. I see that the number of interrupts generated in both cases are not the same. It can be related to the fact that when I generate a C++, even with the minimum code) when I debug it , always triggers an exception (vector 4 'Illegal instruction') and I don't know why, because I don't put any assembler code.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope anyone can give me a clue about it, because I'm stuck.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached two projects one in C and one in C++ (with the same code, but ine generated as a C project and the other one in C++). I only enable the flextimer and set or reset the PortF bit to test with the oscilloscope the signal so I can see the frecuency generated.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't send the projects because it was detected as a virus, and I send only the code.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337750"&gt;testc++.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337750"&gt;testc.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 07:59:15 GMT</pubDate>
    <dc:creator>ernestbori</dc:creator>
    <dc:date>2013-06-26T07:59:15Z</dc:date>
    <item>
      <title>Problems with C++ and Codewarrior</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Problems-with-C-and-Codewarrior/m-p/239774#M11393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert to C++&amp;nbsp; a project made in C, but I am having some problems.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested them with Codewarior 10.2 on linux and Codewarrior 10.3 on Windows (Professional Edition license) with the same results on both of them. I have also tested them on our own board and on the demoboard with the same results.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are developing it with Coldfire V1 MCF51AC256A.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I'm porting a function that it is working on C, to C++ and it doesn't work as expected. That funcion enables a Fextimer to generate a periodic interrupt. I see that the number of interrupts generated in both cases are not the same. It can be related to the fact that when I generate a C++, even with the minimum code) when I debug it , always triggers an exception (vector 4 'Illegal instruction') and I don't know why, because I don't put any assembler code.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope anyone can give me a clue about it, because I'm stuck.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached two projects one in C and one in C++ (with the same code, but ine generated as a C project and the other one in C++). I only enable the flextimer and set or reset the PortF bit to test with the oscilloscope the signal so I can see the frecuency generated.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't send the projects because it was detected as a virus, and I send only the code.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337750"&gt;testc++.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337750"&gt;testc.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 07:59:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Problems-with-C-and-Codewarrior/m-p/239774#M11393</guid>
      <dc:creator>ernestbori</dc:creator>
      <dc:date>2013-06-26T07:59:15Z</dc:date>
    </item>
  </channel>
</rss>

