<?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 Trouble porting HCS08 project from Classic CodeWarrior to CodeWarrior for Microcontroller V10.6 in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468644#M3652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ported a project using an MC9S08GT60A processor from CodeWarrior V6.3 to CodeWarrior V10.6&lt;/P&gt;&lt;P&gt;I followed the guidance in AN4727 and my new project compiled with the same 3 warnings and 2 infos as the old.&lt;/P&gt;&lt;P&gt;The converted project mostly runs the same as the one built with the classic tools, with one major difference:&lt;/P&gt;&lt;P&gt;I am trying to allocate 49 bytes of space in the RAM during runtime.&amp;nbsp; The malloc() call in the new project returns a pointer to address 0x6374, in the flash memory space (in the old project it worked perfectly well).&amp;nbsp; &lt;/P&gt;&lt;P&gt;The memory maps from both projects are relatively similar, with the .bss, .common, HEAP_SEGMENT, and .stack in similar locations, all in the RAM space (0x100 to 0x1069).&lt;/P&gt;&lt;P&gt;Is there a setting that I missed in the new project that tells malloc() where to allocate space?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Apr 2016 22:24:05 GMT</pubDate>
    <dc:creator>greglapin</dc:creator>
    <dc:date>2016-04-01T22:24:05Z</dc:date>
    <item>
      <title>Trouble porting HCS08 project from Classic CodeWarrior to CodeWarrior for Microcontroller V10.6</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468644#M3652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ported a project using an MC9S08GT60A processor from CodeWarrior V6.3 to CodeWarrior V10.6&lt;/P&gt;&lt;P&gt;I followed the guidance in AN4727 and my new project compiled with the same 3 warnings and 2 infos as the old.&lt;/P&gt;&lt;P&gt;The converted project mostly runs the same as the one built with the classic tools, with one major difference:&lt;/P&gt;&lt;P&gt;I am trying to allocate 49 bytes of space in the RAM during runtime.&amp;nbsp; The malloc() call in the new project returns a pointer to address 0x6374, in the flash memory space (in the old project it worked perfectly well).&amp;nbsp; &lt;/P&gt;&lt;P&gt;The memory maps from both projects are relatively similar, with the .bss, .common, HEAP_SEGMENT, and .stack in similar locations, all in the RAM space (0x100 to 0x1069).&lt;/P&gt;&lt;P&gt;Is there a setting that I missed in the new project that tells malloc() where to allocate space?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 22:24:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468644#M3652</guid>
      <dc:creator>greglapin</dc:creator>
      <dc:date>2016-04-01T22:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble porting HCS08 project from Classic CodeWarrior to CodeWarrior for Microcontroller V10.6</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468645#M3653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you didn't mention what exact warning and info message, so I can't say if your problem is because of heap allocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyway, The &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;heap&lt;/STRONG&gt;&lt;/SPAN&gt; is defined in the library file alloc. c, and the size of the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;heap&lt;/STRONG&gt;&lt;/SPAN&gt; is specified in libdefs. h by the LIBDEF_HEAPSIZE define. The default size is 2000, but you can modify it as needed. &lt;/P&gt;&lt;P&gt;how to:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;open the lib project in the folder: \lib\hc12c\hc12_lib.mcp&lt;/LI&gt;&lt;LI&gt;open the heap.c file and the libdefs.h,&lt;/LI&gt;&lt;LI&gt;in the libdefs.h file change the value of LIBDEF_HEAPSIZE (line 193).&lt;/LI&gt;&lt;LI&gt;Rebuild the libraries&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now with the lib you can use the malloc function for your application.&lt;/P&gt;&lt;P&gt;Refer to the heap.c file. All heap is allocated in the HEAP_SEGMENT with a pragma.&lt;/P&gt;&lt;P&gt;So if you want you can place exactly where you want the heap.&lt;/P&gt;&lt;P&gt;Else it will be placed in the DEFAUFT_RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be careful it will work only after you rebuild the lib.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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 Apr 2016 03:03:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468645#M3653</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-04-05T03:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble porting HCS08 project from Classic CodeWarrior to CodeWarrior for Microcontroller V10.6</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468646#M3654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply, Jennie.&lt;/P&gt;&lt;P&gt;There were no errors or additional warnings or info statements that affected the heap (there were the same 3 warnings and 2 info statements in both the Codewarrior 6.3 build and the CWMCU 10.6 build, none of which were related to the heap).&lt;/P&gt;&lt;P&gt;If I ran out of heap space, I would expect the malloc() call to return a NULL pointer.&amp;nbsp; It did not.&amp;nbsp; It returned an actual address, but that address was not in the RAM, it was in the Flash space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:25:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Trouble-porting-HCS08-project-from-Classic-CodeWarrior-to/m-p/468646#M3654</guid>
      <dc:creator>greglapin</dc:creator>
      <dc:date>2016-04-05T15:25:40Z</dc:date>
    </item>
  </channel>
</rss>

