<?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>CodeWarrior for StarCore中的主题 The problem with dynamic memory usage in MSC8156 processor.</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199051#M293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I use board MSC8156ADS and environment CodeWarrior. I’ve decided to check the dynamic memory function. As an example, there was used the project l2_cache_demo.&lt;/P&gt;&lt;P&gt;For memory allotment in memory DDR0 the following function is used:&lt;/P&gt;&lt;P&gt;osMalloc(BUFF_SIZE, OS_MEM_DDR0_SHARED);&lt;/P&gt;&lt;P&gt;In module os_config.h declared&lt;/P&gt;&lt;P&gt;#define OS_SHARED_MEM_DDR0_SIZE 0x1000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OS_SHARED_MEM_DDR0_SIZE limits the max memory size which is allotted in external memory DDR0.&lt;/P&gt;&lt;P&gt;But the size DDR0 is 1GB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to change OS_SHARED_MEM_DDR0_SIZE more there is the mistake during compilation:&lt;/P&gt;&lt;P&gt;ERROR: Non-zero return status from "C:\Program Files\Freescale\CW SC v10.1\eclipse\\..\SC\StarCore_Support\compiler\bin\sc3000-ld.exe". l2_cache_core0 Unknown C/C++ Problem&lt;/P&gt;&lt;P&gt;Fatal(F1031): LCF configuration: in core c0, task task0_c0: virtual memory 'shared_data_ddr0_descriptor'(org=0x41000000, size=0x02000000) is not aligned to MATT/MMU constraints on address and size. os_msc815x_link.l3k l2_cache_core0/link_cmd line 54 C/C++ Problem&lt;/P&gt;&lt;P&gt;make: *** [../../l2_dbg.eld] Error 1 l2_cache_core0 line 0 C/C++ Problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise me how can I use the whole memory (1GB DRR0) and, accordingly, memory DDR1?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 May 2010 17:45:39 GMT</pubDate>
    <dc:creator>exciton</dc:creator>
    <dc:date>2010-05-11T17:45:39Z</dc:date>
    <item>
      <title>The problem with dynamic memory usage in MSC8156 processor.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199051#M293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I use board MSC8156ADS and environment CodeWarrior. I’ve decided to check the dynamic memory function. As an example, there was used the project l2_cache_demo.&lt;/P&gt;&lt;P&gt;For memory allotment in memory DDR0 the following function is used:&lt;/P&gt;&lt;P&gt;osMalloc(BUFF_SIZE, OS_MEM_DDR0_SHARED);&lt;/P&gt;&lt;P&gt;In module os_config.h declared&lt;/P&gt;&lt;P&gt;#define OS_SHARED_MEM_DDR0_SIZE 0x1000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OS_SHARED_MEM_DDR0_SIZE limits the max memory size which is allotted in external memory DDR0.&lt;/P&gt;&lt;P&gt;But the size DDR0 is 1GB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to change OS_SHARED_MEM_DDR0_SIZE more there is the mistake during compilation:&lt;/P&gt;&lt;P&gt;ERROR: Non-zero return status from "C:\Program Files\Freescale\CW SC v10.1\eclipse\\..\SC\StarCore_Support\compiler\bin\sc3000-ld.exe". l2_cache_core0 Unknown C/C++ Problem&lt;/P&gt;&lt;P&gt;Fatal(F1031): LCF configuration: in core c0, task task0_c0: virtual memory 'shared_data_ddr0_descriptor'(org=0x41000000, size=0x02000000) is not aligned to MATT/MMU constraints on address and size. os_msc815x_link.l3k l2_cache_core0/link_cmd line 54 C/C++ Problem&lt;/P&gt;&lt;P&gt;make: *** [../../l2_dbg.eld] Error 1 l2_cache_core0 line 0 C/C++ Problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise me how can I use the whole memory (1GB DRR0) and, accordingly, memory DDR1?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 17:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199051#M293</guid>
      <dc:creator>exciton</dc:creator>
      <dc:date>2010-05-11T17:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: The problem with dynamic memory usage in MSC8156 processor.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199052#M294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The linker files generated when you create a SDOS project with the project wizard as well as the demo projects delivered with SDOS are set up to use a portion of each memory area (M3. DDR0, DDR1) for core private data and the remaining part of memory as shared data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the comment in memory_map_link.l3k mapping in each memory area looks as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;FONT size="2"&gt;
/****************************************************/

/* For each memory - the mapping will be as follows */

/****************************************************/

/* +------------------------------+ _LocalDataM_b */

/* | +--------------------------+ | */

/* | | Local partition core 0 | | */

/* | +--------------------------+ | */

/* | | Local partition core 1 | | */

/* | +--------------------------+ | */

/* | | Local partition core 2 | | */

/* | +--------------------------+ | */

/* | | Local partition core 3 | | */

/* | +--------------------------+ | */

/* | | Local partition core 4 | | */

/* | +--------------------------+ | */

/* | | Local partition core 5 | | */

/* | +--------------------------+ | */

/* +------------------------------+ _LocalDataM_e */

/* |                              | */

/* | Shared partition             | */

/* |                              | */

/* |                              | */

/* |                              | */

/* |                              | */

/* +------------------------------+ */

/* */

/****************************************************/
&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;If you wish to use the whole DDR0 memory area as Shared heap, you need to adjust your .l3k&amp;nbsp;files as well as the os_config.h to make sure&amp;nbsp;there is nothing else allocated in DDR0 anymore.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 19:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199052#M294</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-05-11T19:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: The problem with dynamic memory usage in MSC8156 processor.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199053#M295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for response!&lt;/P&gt;&lt;P&gt;I've looked through .l3k files.&lt;/P&gt;&lt;P&gt;If I understood correctly, the DDR0 Shared Memory size is 1Gb.&amp;nbsp;That's what I need. It seems, all settings are right, but the local memory size is 16 Mb.&amp;nbsp;OS_SHARED_MEM_DDR0_SIZE doesn't allow to allot more than 16 Mb.&lt;/P&gt;&lt;P&gt;Probably, the memory is alloted not in DDR0 Shared Memory, but in local memory,&amp;nbsp;though I point out OS_MEM_DDR0_SHARED.&lt;/P&gt;&lt;P&gt;May be I make smthg in a wrong way.&lt;/P&gt;&lt;P&gt;Could you please explain, what I need to change in l3k files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 14:11:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-StarCore/The-problem-with-dynamic-memory-usage-in-MSC8156-processor/m-p/199053#M295</guid>
      <dc:creator>exciton</dc:creator>
      <dc:date>2010-05-12T14:11:42Z</dc:date>
    </item>
  </channel>
</rss>

