<?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>LPC MicrocontrollersのトピックRe:  Allocating dynamic memory in External SDRAM</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572391#M18568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bavarian on Mon Jan 13 01:21:32 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Simply tell the linker that this is an available memory for allocation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case you want to partition the available memory in the system do different jobs, e.g. parameters in internal SRAM and buffers in external SDRAM, then you need to use specific keywords when you declare the buffers, so that the linker knows that you want to have them in a specific memory section. This heavily depends on the toolchain you use (Keil, IAR, GCC).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Support Team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:56:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:56:15Z</dc:date>
    <item>
      <title>Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572390#M18567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nils28 on Thu Jan 09 09:53:03 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using LPC4337 near to a SDRAM. I would like to use this SDRAM for my memory allocation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to tell to calloc and malloc functions to allocate memory space in SDRAM instead of Internal RAM ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572390#M18567</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re:  Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572391#M18568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bavarian on Mon Jan 13 01:21:32 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Simply tell the linker that this is an available memory for allocation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In case you want to partition the available memory in the system do different jobs, e.g. parameters in internal SRAM and buffers in external SDRAM, then you need to use specific keywords when you declare the buffers, so that the linker knows that you want to have them in a specific memory section. This heavily depends on the toolchain you use (Keil, IAR, GCC).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Support Team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572391#M18568</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:15Z</dc:date>
    </item>
    <item>
      <title>Re:  Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572392#M18569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by goffi on Mon Jan 13 04:59:56 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In your linker configuration, put the heap at the dram address. All the malloc/calloc will reserve a block from that memory&amp;nbsp; (remember to initialize the dram with the right values before use it!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572392#M18569</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:15Z</dc:date>
    </item>
    <item>
      <title>Re:  Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572393#M18570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nils28 on Mon Jan 13 06:50:13 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using LPCXpresso then I use GCC, I think. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have to create a new memory section located at address 0x28000000 in MCU Settings and use &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"__attribute__ ((section("..."))" keyword for each memory pointer defined ? Or as goffi&amp;nbsp; said simple use&amp;nbsp; "PROVIDE(_pvHeapStart = 0x2800000);" in my linker script is enough?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572393#M18570</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:16Z</dc:date>
    </item>
    <item>
      <title>Re:  Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572394#M18571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Mon Jan 13 07:57:16 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest taking a look at these two FAQs…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Flinker-script-templates" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/linker-script-templates&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fheap-checking-redlib" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/heap-checking-redlib&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572394#M18571</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:16Z</dc:date>
    </item>
    <item>
      <title>Re:  Allocating dynamic memory in External SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572395#M18572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bavarian on Mon Jan 13 08:31:16 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Both ways are valid somehow. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the malloc library functions the heap is used, the location of the heap can be defined in the linker script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look here in the section "Linker script template":&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts"&gt;http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either you provide directly an address like 0x28000000 or a symbol like .SDRAM0 which you defined with the memory editor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For any buffers or structures or parameters you want to place in SDRAM you can use the other method, providing in the memory editor a section name for the SDRAM (Edit --&amp;gt; Add RAM) and work with "__attribute__ ((section("..."))" .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you place anything in SDRAM then you need to take care that the SDRAM is set up before it is used. This means you need to do it at a very early stage, before any access to the SDRAM is made to e.g. zero-initialize data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Support Team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:56:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Allocating-dynamic-memory-in-External-SDRAM/m-p/572395#M18572</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:56:17Z</dc:date>
    </item>
  </channel>
</rss>

