<?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: Linker definition in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583265#M25786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Fri Jun 14 00:30:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What exactly do you think is wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Information on linker script format can be found in the linker docs, included in the built-in help of LPCXpresso5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also several linker/linker script related FAQs here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/CodeRedFAQ#Compiler&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You might also want to read the introduction to linker scripts available in Building Bare-Metal ARM Systems with GNU: Part 3 at: &lt;/SPAN&gt;&lt;A href="http://"&gt;http://www.embedded.com/design/201000339&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:38:36 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:38:36Z</dc:date>
    <item>
      <title>Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583264#M25785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by guillaumeL on Thu Jun 13 09:17:03 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with a LPC1769 and I have a question concerning the linker file. I want to use the 64k of Ram available in the product but I don't think the linker file is well defined. Could you help me to understand this linker file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
[LEFT]MEMORY
{
/* Define each memory region */
MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x72000 /* 512k - 28k - 4k*/
RamLoc32 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x8000 /* 32k */
RamAHB32 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x8000 /* 32k */[/LEFT]
 
[LEFT]}
/* Define a symbol for the top of each memory region */
__top_MFlash512 = 0x0 + 0x72000;
__top_RamLoc32 = 0x10000000 + 0x8000;
__top_RamAHB32 = 0x2007c000 + 0x8000;[/LEFT]
 
[LEFT]SECTIONS
{[/LEFT]
 
[LEFT]/* MAIN TEXT SECTION */ 
.text : ALIGN(4)
{
FILL(0xff)
KEEP(*(.isr_vector))[/LEFT]
 
[LEFT]/* Global Section Table */
. = ALIGN(4) ;
__section_table_start = .;
__data_section_table = .;
LONG(LOADADDR(.data));
LONG( ADDR(.data)) ;
LONG( SIZEOF(.data));
LONG(LOADADDR(.data_RAM2));
LONG( ADDR(.data_RAM2)) ;
LONG( SIZEOF(.data_RAM2));
__data_section_table_end = .;
__bss_section_table = .;
LONG( ADDR(.bss));
LONG( SIZEOF(.bss));
LONG( ADDR(.bss_RAM2));
LONG( SIZEOF(.bss_RAM2));
__bss_section_table_end = .;
__section_table_end = . ;
/* End of Global Section Table */[/LEFT]
 
 
[LEFT]*(.after_vectors*)[/LEFT]
 
[LEFT]*(.text*)
*(.rodata .rodata.*)
. = ALIGN(4);[/LEFT]
 
[LEFT]} &amp;gt; MFlash512[/LEFT]
 
[LEFT]/*
* for exception handling/unwind - some Newlib functions (in common
* with C++ and STDC++) use this.
*/
.ARM.extab : ALIGN(4)
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} &amp;gt; MFlash512
__exidx_start = .;[/LEFT]
 
[LEFT].ARM.exidx : ALIGN(4)
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} &amp;gt; MFlash512
__exidx_end = .;[/LEFT]
 
[LEFT]_etext = .;[/LEFT]
 
[LEFT].data_RAM2 : ALIGN(4)
{
FILL(0xff)
*(.data.$RAM2*)
*(.data.$RamAHB32*)
. = ALIGN(4) ;
} &amp;gt; RamAHB32 AT&amp;gt;MFlash512[/LEFT]
 
[LEFT]/* MAIN DATA SECTION */[/LEFT]
 
[LEFT].uninit_RESERVED : ALIGN(4)
{
KEEP(*(.bss.$RESERVED*))
} &amp;gt; RamLoc32[/LEFT]
 
[LEFT].data : ALIGN(4)
{
FILL(0xff)
_data = .;
*(vtable)
*(.data*)
. = ALIGN(4) ;
_edata = .;
} &amp;gt; RamLoc32 AT&amp;gt;MFlash512[/LEFT]
 
 
[LEFT].bss_RAM2 : ALIGN(4)
{
*(.bss.$RAM2*)
*(.bss.$RamAHB32*)
. = ALIGN(4) ;
} &amp;gt; RamAHB32[/LEFT]
 
[LEFT]/* MAIN BSS SECTION */
.bss : ALIGN(4)
{
_bss = .;
*(.bss*)
*(COMMON)
. = ALIGN(4) ;
_ebss = .;
PROVIDE(end = .);
} &amp;gt; RamLoc32[/LEFT]
 
[LEFT]PROVIDE(_pvHeapStart = .);
PROVIDE(_vStackTop = __top_RamLoc32 - 0);[/LEFT]
}
 
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583264#M25785</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583265#M25786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Fri Jun 14 00:30:24 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What exactly do you think is wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Information on linker script format can be found in the linker docs, included in the built-in help of LPCXpresso5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are also several linker/linker script related FAQs here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/CodeRedFAQ#Compiler&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You might also want to read the introduction to linker scripts available in Building Bare-Metal ARM Systems with GNU: Part 3 at: &lt;/SPAN&gt;&lt;A href="http://"&gt;http://www.embedded.com/design/201000339&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583265#M25786</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583266#M25787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by stalisman on Fri Jun 14 03:46:46 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Linker files like make files are notorious gobldygook to the casual eye.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you have to change them then there is no alternative to 'biting the bullet' and learning their syntax and meanings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583266#M25787</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583267#M25788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by guillaumeL on Tue Jun 18 03:00:17 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; My linker file is working fine but the problem is this one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My program is ~15k ram and during the test program execution, the program allocate RAM area using malloc function. unfortunately, when I reach 32k ram, the malloc function fails. I ty to find a way to use the second 32k RAM bank but I didn't find a solution. I try to use [SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]__attribute__((section("RamAHB32"))) [SIZE=3][COLOR=black]but[/COLOR][COLOR=black] it puts all variables in the first RAM bank and not in the second. [/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583267#M25788</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583268#M25789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Jun 18 03:39:00 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure what you are trying to do. For using RAM2 it's not necessary to use your own linker script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso is doing that for you with &amp;lt; cr_section_macros.h &amp;gt; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
/*
===============================================================================
 Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : main.c
 Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : $(author)
 Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :
 Copyright&amp;nbsp;&amp;nbsp; : $(copyright)
 Description : main definition
===============================================================================
*/

#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include &amp;lt;cr_section_macros.h&amp;gt;
#include &amp;lt;NXP/crp.h&amp;gt;

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#include &amp;lt;stdio.h&amp;gt;

[COLOR=Red]__DATA(RAM2) uint16_t demo[200];[/COLOR]

int main(void) {
[COLOR=Red]&amp;nbsp;&amp;nbsp;&amp;nbsp; demo[0] = 0x1234;[/COLOR]
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Hello World\n");
....

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583268#M25789</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Linker definition</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583269#M25790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Wed Jun 19 00:52:54 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There is an example of moving the heap and stack up into the second bank of RAM in this FAQ:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:38:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Linker-definition/m-p/583269#M25790</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:38:38Z</dc:date>
    </item>
  </channel>
</rss>

