<?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: how configure keil for use from external sram as default heap location</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/how-configure-keil-for-use-from-external-sram-as-default-heap/m-p/523343#M5979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by xianghuiwang on Fri May 16 17:27:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Defining __initial_sp, __heap_base and __heap_limit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Home » The ARM C and C++ libraries » Defining __initial_sp, __heap_base and __heap_limi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One of several methods you can use to specify the initial stack pointer and heap bounds is to define the following symbols:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__initial_sp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__heap_base&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__heap_limit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can define these symbols in an assembly language file, or by using the embedded assembler in C.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__asm void dummy_function(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __initial_sp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __heap_base&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __heap_limit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__initial_sp EQU STACK_BASE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__heap_base EQU HEAP_BASE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__heap_limit EQU (HEAP_BASE + HEAP_SIZE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The constants STACK_BASE, HEAP_BASE and HEAP_SIZE can be defined in a header file, for example stack.h, as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* stack.h */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define HEAP_BASE 0x20100000&amp;nbsp; /* Example memory addresses */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define STACK_BASE 0x20200000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define HEAP_SIZE ((STACK_BASE-HEAP_BASE)/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define STACK_SIZE ((STACK_BASE-HEAP_BASE)/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This method of specifying the initial stack pointer and heap bounds is supported by both the standard C library (standardlib) and the micro C library (microlib).&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:59:32 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:59:32Z</dc:date>
    <item>
      <title>how configure keil for use from external sram as default heap location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/how-configure-keil-for-use-from-external-sram-as-default-heap/m-p/523342#M5978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by alireza sd on Sun Apr 27 00:23:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi to all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am beginner in embedded systems so I need your helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Recently I was working on a training project and on it I use from lpc1788 with 2mb * 16bit external ram,i successfully use from external memory as buffer of LCD controller, but i can not configure my compiler to use from it as default heap location(my compiler is keil v5),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now any one can give me a guide that how can i configure keil for use from external memory as default heap location.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Excuse me for my bad English.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your attention.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:59:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/how-configure-keil-for-use-from-external-sram-as-default-heap/m-p/523342#M5978</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: how configure keil for use from external sram as default heap location</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/how-configure-keil-for-use-from-external-sram-as-default-heap/m-p/523343#M5979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by xianghuiwang on Fri May 16 17:27:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Defining __initial_sp, __heap_base and __heap_limit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Home » The ARM C and C++ libraries » Defining __initial_sp, __heap_base and __heap_limi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One of several methods you can use to specify the initial stack pointer and heap bounds is to define the following symbols:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__initial_sp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__heap_base&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;•__heap_limit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can define these symbols in an assembly language file, or by using the embedded assembler in C.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__asm void dummy_function(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __initial_sp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __heap_base&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORT __heap_limit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__initial_sp EQU STACK_BASE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__heap_base EQU HEAP_BASE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__heap_limit EQU (HEAP_BASE + HEAP_SIZE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The constants STACK_BASE, HEAP_BASE and HEAP_SIZE can be defined in a header file, for example stack.h, as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* stack.h */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define HEAP_BASE 0x20100000&amp;nbsp; /* Example memory addresses */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define STACK_BASE 0x20200000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define HEAP_SIZE ((STACK_BASE-HEAP_BASE)/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define STACK_SIZE ((STACK_BASE-HEAP_BASE)/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Note&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This method of specifying the initial stack pointer and heap bounds is supported by both the standard C library (standardlib) and the micro C library (microlib).&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:59:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/how-configure-keil-for-use-from-external-sram-as-default-heap/m-p/523343#M5979</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:59:32Z</dc:date>
    </item>
  </channel>
</rss>

