<?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 Re: Having trouble with memory relocation of C++ objects in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502643#M31513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the delay, are you still having this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be helpful if you could attach a project where we can reproduce this behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Carlos Mendoza&lt;/P&gt;&lt;P&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Mar 2016 17:03:03 GMT</pubDate>
    <dc:creator>Carlos_Mendoza</dc:creator>
    <dc:date>2016-03-16T17:03:03Z</dc:date>
    <item>
      <title>Having trouble with memory relocation of C++ objects</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502642#M31512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've received good information in a previous post regarding &lt;A _jive_internal="true" href="https://community.nxp.com/thread/356026"&gt;moving memory around&lt;/A&gt; to deal with the split memory architecture in the Kinetis processors.&amp;nbsp; While I haven't yet tried to apply it to the memory allocated for an MQX task's stack, I have moved global buffers to the smaller section of RAM.&amp;nbsp; So far, that seems to work (compiles, runs, and exhibits proper behavior).&amp;nbsp; However, it only works for arrays of standard types.&amp;nbsp; If I try to move a global C++ object, it builds, but execution fails immediately and I end up in my fault handler code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically, what happens is that I get an unhandled interrupt: &lt;SPAN class="st"&gt;&lt;SPAN class="f"&gt;&lt;/SPAN&gt;WDOG_EWM_IRQHandler.&amp;nbsp; If I define an empty handler for that function, then I just get another, and another, and the list of unhandled IRQ handlers grows and grows.&amp;nbsp; This is very strange.&amp;nbsp; Can anyone explain why this happens, and what, if anything, can be done to make reallocation of C++ objects work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="st"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="st"&gt;BTW, I am using &lt;SPAN style="font-family: courier new,courier; color: #3334ca;"&gt;__attribute__((section(".m_data_2")))&lt;/SPAN&gt; to move my objects to the smaller section of RAM.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 16:50:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502642#M31512</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2016-02-11T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with memory relocation of C++ objects</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502643#M31513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the delay, are you still having this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will be helpful if you could attach a project where we can reproduce this behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Carlos Mendoza&lt;/P&gt;&lt;P&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 17:03:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502643#M31513</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2016-03-16T17:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble with memory relocation of C++ objects</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502644#M31514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos, I was able to get this to work for C arrays only, and not for my C++ objects.&amp;nbsp; So for now, I'm only relocating my MQX task stacks and other general purpose buffers.&amp;nbsp; However, some of my colleagues are experiencing this issue with the WDOG ISR, so I'll get back to you once I have had a chance to take a look at their projects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 17:49:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Having-trouble-with-memory-relocation-of-C-objects/m-p/502644#M31514</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2016-03-16T17:49:53Z</dc:date>
    </item>
  </channel>
</rss>

