<?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: Can I use both flash banks in LPC18S37? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860933#M34266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the answer. Please let me specify what I want. The default setting is perfect, put code into Flash bank A and boot from bank A. I will not change it. Also the default memory setting is fine. My question was, how can I use bank B additionally?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand LPC flash memory organization it is not possible to use both flash banks as entire flash memory. I can only use one bank at a time, either A or B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Booting and startup code should stay in bank A and I want to put a large library in bank B. Can I put all code into one project and define the startup code as “put it into bank A” and the library code as “put it into bank B”? Or must I broke the project into two parts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never found settings in MCUXpresso which allowing that, therefore I assume I must broke my project in two parts. Let say I put the library with a jump table at top into bank B and allow from defined addresses from bank B via 0x1B000000 + offset -&amp;gt; jumps into library code. Then I must put a “jump function” in bank A which branches to the table in bank B to call a “bank B function”. With this mechanism I can call functions in bank B from bank A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end my question: do you know MCUXpresso allows an easier way to realize it as my “jump table mechanism”?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my comprehensive question,&lt;BR /&gt; thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Mar 2019 13:40:00 GMT</pubDate>
    <dc:creator>nxp68994</dc:creator>
    <dc:date>2019-03-29T13:40:00Z</dc:date>
    <item>
      <title>Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860931#M34264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The LPC18S37 has two flash banks A and B. Usually flash bank A is used for downloading and booting. As I understand the user manual, both flash banks cannot not be used simultaneously, but code which is stored in bank B can be called from code in bank A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I come to my question: does MCUXpresso IDE support distributed code in both flash banks? Or must I define my own jump table in bank B to reach function from bank A?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 09:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860931#M34264</guid>
      <dc:creator>nxp68994</dc:creator>
      <dc:date>2019-03-28T09:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860932#M34265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A number of LPC18/43 parts provide dual banks of internal Flash, with bank A starting at address 0x1A000000, and bank B starting at address 0x1B000000.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* LPC18x3/LPC43x3 : Flash = 2x 256KB (512 KB total)&lt;BR /&gt;* LPC18x5/LPC43x5 : Flash = 2x 384KB (768 KB total)&lt;BR /&gt;* LPC18x7/LPC43x7 : Flash = 2x 512KB ( 1 MB total)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When you create a new project using the New Project Wizard for one of these parts, an appropriate default Flash driver (from LPC18x3_43x3_2x256_BootA.cfx /LPC18x5_43x5_2x384_BootA.cfx /LPC18x7_43x7_2x512_BootA.cfx) will be selected which after programming the part will also configure it to boot from Bank A Flash.&lt;BR /&gt;If you wish to boot from Bank B Flash instead, then you will need to manually configure the project to use the corresponding “BootB” Flash driver ( LPC18x3_43x3_2x256_BootB.cfx /LPC18x5_43x5_2x384_BootB.cfx / LPC18x7_43x7_2x512_BootB.cfx). This can be done by selecting the appropriate driver file in the “Flash driver” field of the Memory Configuration Editor.&lt;BR /&gt;Note: you will also need to delete Flash Bank A from the list of available memories (or at least reorder so that Flash Bank B is first).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition&amp;nbsp;MCUXpresso IDE provides a number of mechanisms to allow you to do this whilst still being able to use the managed linker script mechanism. These include:&lt;BR /&gt;• Changing the layout and order of memory using the Memory Configuration Editor&lt;BR /&gt;• Changing the size and location of the stack and heap using the Heap and Stack Editor&lt;BR /&gt;• Decorating the definitions of variables and functions in your source code with macros from the cr_section_macros.h to cause them to be placed into different memory blocks&amp;nbsp;&lt;/P&gt;&lt;P&gt;• Providing project specific versions of FreeMarker linker script templates to change particular&lt;BR /&gt;aspects of how the managed linker script mechanism creates the final linker script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check more information about how to use the Memory Configuration Editor in chapter 16.8 of the attached user guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; margin: 20px 0px;"&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Have a nice day!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Sol&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;/DIV&gt;&lt;DIV class="" style="border: 0px; font-weight: inherit; font-size: 14px; margin: 20px 0px 0px;"&gt;&lt;DIV class="" data-comment-id="1131680" style="color: #646464; border: none; font-weight: inherit; font-size: 0.8571rem;"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 19:38:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860932#M34265</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2019-03-28T19:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860933#M34266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the answer. Please let me specify what I want. The default setting is perfect, put code into Flash bank A and boot from bank A. I will not change it. Also the default memory setting is fine. My question was, how can I use bank B additionally?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand LPC flash memory organization it is not possible to use both flash banks as entire flash memory. I can only use one bank at a time, either A or B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Booting and startup code should stay in bank A and I want to put a large library in bank B. Can I put all code into one project and define the startup code as “put it into bank A” and the library code as “put it into bank B”? Or must I broke the project into two parts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never found settings in MCUXpresso which allowing that, therefore I assume I must broke my project in two parts. Let say I put the library with a jump table at top into bank B and allow from defined addresses from bank B via 0x1B000000 + offset -&amp;gt; jumps into library code. Then I must put a “jump function” in bank A which branches to the table in bank B to call a “bank B function”. With this mechanism I can call functions in bank B from bank A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end my question: do you know MCUXpresso allows an easier way to realize it as my “jump table mechanism”?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my comprehensive question,&lt;BR /&gt; thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 13:40:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860933#M34266</guid>
      <dc:creator>nxp68994</dc:creator>
      <dc:date>2019-03-29T13:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860934#M34267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check the 16.13.2 section of the user manual, this section may help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;16.13.2 Configuring projects to span multiple Flash Devices&lt;BR /&gt;Most MCUs only have one bank of Flash memory. But with some parts more than one bank may&lt;BR /&gt;be available – and in such cases, by default, the managed linker script mechanism will still place&lt;BR /&gt;all of the application code and rodata (consts) into the first bank of Flash (as displayed in the&lt;BR /&gt;Memory Configuration Editor)..&lt;BR /&gt;For example&lt;BR /&gt;• most of the LPC18 and LPC43xx parts containing internal Flash (such as LPC1857 and&lt;BR /&gt;LPC4357) actually provide dual banks of Flash.&lt;BR /&gt;• some MCUs have the ability to access external Flash (typically SPIFI) as well as their built-in&lt;BR /&gt;internal Flash (e.g. LPC18xx, LPC40xx, LPC43xx, LPC546xx).&lt;BR /&gt;The macros provided in the “cr_section_macros.h” header file provide some ability to control the&lt;BR /&gt;placement of specific functions or rodata items into the second (or even third) bank of Flash.&lt;BR /&gt;However the use of FreeMarker linkers script templates allow this to be done in a much more&lt;BR /&gt;powerful and flexible way.&lt;BR /&gt;One typical use case for this is a project which stores its main code and data in internal Flash,&lt;BR /&gt;but additional rodata (for example graphics data for displaying on an LCD) in the external SPIFI&lt;BR /&gt;Flash.&lt;BR /&gt;For instance, consider an example project where such rodata is all contained in a set of specific&lt;BR /&gt;files, which we therefore want to place into the external Flash device. One very simple way to do&lt;BR /&gt;this is to place such source files into a separate source folder within your project. You can then&lt;BR /&gt;supply linker script templates to place the code and rodata from these files into the appropriate&lt;BR /&gt;Flash.&lt;BR /&gt;For example, for a project using the LPC4337 with two internal Flash banks, plus external SPIFI&lt;BR /&gt;Flash, if the source folder used for this purpose were called ‘spifidata’, then placing the following&lt;BR /&gt;files into a linkscripts directory within your project would have the desired effect:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text.ldt&lt;BR /&gt;&amp;lt;#if memory.alias=="Flash3"&amp;gt;&lt;BR /&gt;*spifidata/*(.text*)&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;BR /&gt;*(.text_${memory.alias}*) /* for compatibility with previous releases */&lt;BR /&gt;*(.text_${memory.name}*) /* for compatibility with previous releases */&lt;BR /&gt;*(.text.$${memory.alias}*)&lt;BR /&gt;*(.text.$${memory.name}*)&lt;BR /&gt;rodata.ldt&lt;BR /&gt;&amp;lt;#if memory.alias=="Flash3"&amp;gt;&lt;BR /&gt;*spifidata/*(.rodata*)&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;BR /&gt;*(rodata.$${memory.alias}*)&lt;BR /&gt;*(rodata.$${memory.name}*)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: the check of the memory.alias being Flash3 is to prevent the code/rodata items from ending&lt;BR /&gt;up in the BankB Flash bank (which is Flash2 by default).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Have a nice day!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Sol&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 16:51:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860934#M34267</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2019-04-05T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860935#M34268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sol,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the explanation. With the ability to modify the generation of linker scripts brings a great flexibility. A lot of the files *.ldt in folder …\ide\Wizards\linker are used to prepare the linker setup. Is there a small example how to include an own ldt file? Let say I write my own “flash2.ldt” where the linker statements for the Flash B are defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would define a custom section for code for flash bank B:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: #EFF0F1;"&gt;&lt;SPAN style="font-size: 10.0pt; color: #101094; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;void&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt; foo() __attribute__((section(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #7d2727; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;".text_flashB"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: #EFF0F1;"&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: #EFF0F1;"&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #101094; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt;void&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #303336; border: none windowtext 1.0pt; padding: 0cm; background: #EFF0F1;"&gt; foo() {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;The file “flash2.ldt” generate the linker statements to include “.text_flashB” code content into section of flash bank B. I ask myself, how the ldt-file is loaded (automatically?) and where do I find examples of FreeMarker code snippets used by MCUxpresso?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could imagine that this is a normal use-case for professional LPC18xx projects where the entire flash memory must be used. Do you know about such example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know, my question is a little bit ambitious and brings you into your maximum load limit. Sorry for that!&lt;/P&gt;&lt;P&gt;Anyhow, thank you for the help and useful answers so far!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2019 12:32:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860935#M34268</guid>
      <dc:creator>nxp68994</dc:creator>
      <dc:date>2019-04-23T12:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860936#M34269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if the following information helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;17.12 FreeMarker Linker Script Templates&lt;BR /&gt;By default, MCUXpresso IDE projects use a managed linker script mechanism which&lt;BR /&gt;automatically generates a linker script file without user intervention – allowing the project code&lt;BR /&gt;and data to be laid out in memory based on the IDE’s knowledge of the memory layout of the&lt;BR /&gt;target MCU.&lt;BR /&gt;However sometimes the linker script generated in this way may not provide exactly the memory&lt;BR /&gt;layout required. MCUXpresso IDE therefore provides a highly flexible and powerful linker script&lt;BR /&gt;template mechanism to allow the user to change the content of the linker script generated by&lt;BR /&gt;the managed linker script mechanism&lt;BR /&gt;17.12.1 Basics&lt;BR /&gt;FreeMarker is a template engine: a generic tool to generate text output (HTML web pages, emails,&lt;BR /&gt;configuration files, source code, etc.) based on templates and changing data. Built into&lt;BR /&gt;MCUXpresso IDE are a set of templates that are processed by the FreeMarker template engine&lt;BR /&gt;to create the linker script. Templates are written in the FreeMarker Template Language (FTL),&lt;BR /&gt;which is a simple, specialized language, not a full-blown programming language like PHP. Full&lt;BR /&gt;documentation for FreeMarker can be found at &lt;A href="http://freemarker.org/docs/index.html" target="test_blank"&gt;http://freemarker.org/docs/index.html&lt;/A&gt; .&lt;BR /&gt;MCUXpresso IDE automatically invokes FreeMarker, passing it a data model that describes&lt;BR /&gt;the memory layout of the target together with a ‘root’ template that is processed to create the&lt;BR /&gt;linker script. This root template, #includes further ‘component’ templates. This structure allows&lt;BR /&gt;a linker script to be broken down into various components, and allows a user to provide their&lt;BR /&gt;own templates for a component, instead of having to (re-)write the whole template. For example,&lt;BR /&gt;component templates are provided for text, data and bss sections, allowing the user to provide a&lt;BR /&gt;different implementations as necessary, but leaving the other parts of the linker script untouched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/80961i3A467E8B6B0325FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;17.12.2 Reference&lt;BR /&gt;FreeMarker reads input files, copying text and processing FreeMarker directives and ‘variables’,&lt;BR /&gt;and writes an output file. As used by the MCUXpresso IDE managed linker script mechanism,&lt;BR /&gt;the input files describe the various components of a linker script which, together with variables&lt;/P&gt;&lt;P&gt;defined by the IDE, are used to generate a complete linker script. Any of the component template&lt;BR /&gt;input files may be overridden by providing a local version in the project.&lt;BR /&gt;The component template input files are provided as a hierarchy, shown below, where each file&lt;BR /&gt;#includes those files nested below. This allows for individual components of the linker script to be&lt;BR /&gt;overridden without having to supply the entire linker script, increasing flexibility, while maintaining&lt;BR /&gt;the benefits of Managed Linker Scripts.&lt;BR /&gt;Linker script template hierarchy&lt;BR /&gt;linkscript.ldt (top level)&lt;BR /&gt;• user.ldt (an empty file designed to be overridden by users that is included in linkscript, memory&lt;BR /&gt;and library templates)&lt;BR /&gt;• user_linkscript.ldt (an empty file designed to be overridden by users that is included in linkscript&lt;BR /&gt;only)&lt;BR /&gt;• linkscript_common.ldt (root for main content)&lt;BR /&gt;• header.ldt (the header for scripts)&lt;BR /&gt;• listvars.ldt (a script to output a list of all predefined variables available to the template)&lt;BR /&gt;• includes.ldt (includes the memory and library scripts)&lt;BR /&gt;• section_top.ldt (top of the linker script SECTION directive)&lt;BR /&gt;• text_section.ldt (text sections for each secondary Flash)&lt;BR /&gt;• text_section_multicore.ldt (text sections for multicore targets)&lt;BR /&gt;• extrasections_text.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;BR /&gt;• text.ldt (for inserting *text)&lt;BR /&gt;• extrasections_rodata.ldt (additional sections specified in Properties – Managed Linker&lt;BR /&gt;Script pane)&lt;BR /&gt;• rodata.ldt (for inserting rodata)&lt;BR /&gt;• boot_hdr.ldt (allows placement of optional header before main code section)&lt;BR /&gt;• boot_hdr_partfamily.ldt&lt;BR /&gt;• main_text_section.ldt (the primary text section)&lt;BR /&gt;• global_section_table.ldt (the global section table)&lt;BR /&gt;• crp.ldt (the CRP information)&lt;BR /&gt;• extrasections_text.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;BR /&gt;• main_text.ldt (for inserting *text)&lt;BR /&gt;• extrasections_rodata.ldt (additional sections specified in Properties – Managed Linker&lt;BR /&gt;Script pane)&lt;BR /&gt;• main_rodata.ldt (read-only data)&lt;BR /&gt;• cpp_info.ldt (additional C++ requirements)&lt;BR /&gt;• exdata.ldt (the exdata sections)&lt;BR /&gt;• end_text.ldt (end of text marker)&lt;BR /&gt;• usb_ram_section.ldt (placement of SDK USB data structures)&lt;BR /&gt;• stack_heap_sdk_start.ldt (placement of MCUXpresso style heap/stack)&lt;BR /&gt;• data_section.ldt (data sections for secondary ram)&lt;BR /&gt;• data_section_multicore.ldt (data sections for multicore targets)&lt;BR /&gt;• extrasections_data.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;BR /&gt;• data.ldt (for inserting *data)&lt;BR /&gt;• mtb_default_section.ldt (special section for MTB (cortex-m0+ targets)&lt;BR /&gt;• uninit_reserved_section.ldt (uninitialised data)&lt;BR /&gt;• main_data_section.ldt primary data section)&lt;BR /&gt;• extrasections_data.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;/P&gt;&lt;P&gt;• main_data.ldt (for inserting *data)&lt;BR /&gt;• bss_section.ldt (secondary bss sections)&lt;BR /&gt;• extrasections_bss.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;BR /&gt;• bss.ldt (for inserting *bss)&lt;BR /&gt;• main_bss_section.ldt primary bss section)&lt;BR /&gt;• extrasections_bss.ldt (additional sections specified in Properties – Managed Linker Script&lt;BR /&gt;pane)&lt;BR /&gt;• main_bss.ldt (for inserting *bss)&lt;BR /&gt;• noinit_section.ldt (no-init data)&lt;BR /&gt;• extrasections_noninit.ldt (additional sections specified in Properties – Managed Linker&lt;BR /&gt;Script pane)&lt;BR /&gt;• noinit_noload_section.ldt (no-load data)&lt;BR /&gt;• stack_heap_sdk_postdata.ldt (placement of MCUXpresso style heap/stack)&lt;BR /&gt;• stack_heap_sdk_end.ldt (placement of MCUXpresso style heap/stack)&lt;BR /&gt;• stack_heap.ldt (define the stack and heap)&lt;BR /&gt;• checksum.ldt (create the LPC checksum)&lt;BR /&gt;• image_size.ldt (provide basic symbols giving location and size of image)&lt;BR /&gt;• symbols.ldt (provide additional symbols needed to built image)&lt;BR /&gt;• symbols_partfamily.ldt&lt;BR /&gt;• section_tail.ldt (immediately before the send of linker SECTION directive)&lt;BR /&gt;library.ldt (the standard libraries used in the application)&lt;BR /&gt;• user.ldt (an empty file designed to be overridden by users that is included in linkscript, memory&lt;BR /&gt;and library templates)&lt;BR /&gt;• user_library.ldt (an empty file designed to be overridden by users that is included in library only)&lt;BR /&gt;memory.ldt (the memory map)&lt;BR /&gt;• user.ldt (an empty file designed to be overridden by users that is included in linkscript, memory&lt;BR /&gt;and library templates)&lt;BR /&gt;• user_memory.ldt (an empty file designed to be overridden by users that is included in memory&lt;BR /&gt;only)&lt;BR /&gt;Linker script search paths&lt;BR /&gt;Whenever a linker script template is used, MCUXpresso IDE will search in the following locations,&lt;BR /&gt;in the order shown:&lt;BR /&gt;• project/linkscripts&lt;BR /&gt;• the searchPath global variable&lt;BR /&gt;• The searchPath can be set in a script by using the syntax &amp;lt;#global searchPath=“c:/windows/&lt;BR /&gt;path;d:/another/windows/path”&amp;gt;&lt;BR /&gt;• each directory to search is separated by a semicolon ';'&lt;BR /&gt;• mcuxpresso_install_dir/ide/Data/Linkscripts&lt;BR /&gt;• linker templates can be placed in this directory to override the default templates for an entire&lt;BR /&gt;installation&lt;BR /&gt;• MCUXpresso IDE internally provided templates (not directly visible to users)&lt;BR /&gt;Thus, a project can simply override any template by simply creating a linkscript directory within&lt;BR /&gt;the project and placing the appropriate template in there. Using the special syntax “super@” an&lt;BR /&gt;overridden template can reference a file from the next level of the search path&lt;BR /&gt;e.g. &amp;lt;#include “super@user.ldt”&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;script templates&lt;BR /&gt;Copies of the default linker script templates used within MCUXpresso IDE can be found in the&lt;BR /&gt;Wizards/linker directory within the MCUXpresso IDE install. These can be used as the basis of&lt;BR /&gt;any project local scripts you wish to write.&lt;BR /&gt;Predefined variables (macros)&lt;BR /&gt;List (sequence) variables (used in #list)&lt;BR /&gt;libraries[]&lt;BR /&gt;• list of the libraries to be included in the “lib” script&lt;BR /&gt;• for example (Redlib nohost)&lt;BR /&gt;libraries[0]=libcr_c.a&lt;BR /&gt;libraries[1]=libcr_eabihelpers.a&lt;BR /&gt;configMemory[]&lt;BR /&gt;• list of each memory region defined in the memory map for the project. Each entry has the&lt;BR /&gt;following fields defined&lt;BR /&gt;• name – the name of the memory region&lt;BR /&gt;• alias – the alias of the memory region&lt;BR /&gt;• location – the base address of the memory&lt;BR /&gt;• size – the size of the memory region&lt;BR /&gt;• sizek – the printable size of the memory region in k or M&lt;BR /&gt;• mcuPattern&lt;BR /&gt;• defaultRAM – boolean indicating if this is the default RAM region&lt;BR /&gt;• defaultFlash – boolean indication if this is the default Flash region&lt;BR /&gt;• RAM – boolean indicating if this is RAM&lt;BR /&gt;• Flash – boolean indicating if this is Flash&lt;BR /&gt;for example:&lt;BR /&gt;configMemory[0]= name=MFlashA512 alias=Flash location=0x1a000000&lt;BR /&gt;size=0x80000 sizek=512K bytes mcuPattern=Flash flash=true RAM=false&lt;BR /&gt;defaultFlash=true defaultRAM=false&lt;BR /&gt;configMemory[2]= name=RamLoc32 alias=RAM location=0x10000000&lt;BR /&gt;size=0x8000 sizek=32K bytes mcuPattern=RAM flash=false RAM=true&lt;BR /&gt;defaultFlash=false defaultRAM=true&lt;BR /&gt;Slaves[]&lt;BR /&gt;• list of the Slaves in a Multicore project. This variable is only defined in Multicore projects. Each&lt;BR /&gt;entry has the following fields defined&lt;BR /&gt;• name – name of the Slave&lt;BR /&gt;• enabled – boolean indicating if this Slave is enabled&lt;BR /&gt;• objPath – path to the object file for the Slave image&lt;BR /&gt;• linkSection – name of the section this Slave is to be linked in&lt;BR /&gt;• runtimeSection&lt;BR /&gt;• textSection – name of the text section&lt;BR /&gt;• textSectionNormalized – normalized name of the text section&lt;BR /&gt;• dataStartSymbol – name of the Symbol defining the start of the data&lt;/P&gt;&lt;P&gt;• dataEndSymbol – name of the Symbol defining the end of the data&lt;BR /&gt;for example:&lt;BR /&gt;slaves[0] = name=M0APP objectPath=${workspace_loc:/MCB4357_Blinky_DualM0/Debug&lt;BR /&gt;/MCB4357_Blinky_DualM0.axf.o}linkSection=Flash2 runtimeSection= textSection=&lt;BR /&gt;.core_m0app textSectionNormalized=_core_m0appdata StartSymbol=__start_data&lt;BR /&gt;dataEndSymbol=__end_data enabled=true;&amp;lt;/notextile&amp;gt;&lt;BR /&gt;Simple variables include:&lt;BR /&gt;• CODE – name of the memory region to place the default code (text) section&lt;BR /&gt;• CRP_ADDRESS – location of the Code Read Protect value&lt;BR /&gt;• DATA – name of the memory region to place the default data section&lt;BR /&gt;• LINK_TO_RAM – value of the “Link to RAM” linker option&lt;BR /&gt;• STACK_OFFSET – value of the Stack Offset linker option&lt;BR /&gt;• FLASHn – defined for each FLASH memory&lt;BR /&gt;• RAMn – defined for each RAM memory&lt;BR /&gt;• basename – internal name of the process&lt;BR /&gt;• bss_align – alignment for .bss sections&lt;BR /&gt;• buildConfig – the name of the configuration being built&lt;BR /&gt;• chipFamily – the chip family&lt;BR /&gt;• chipName – name of the target chip&lt;BR /&gt;• data_align – alignment for .data section&lt;BR /&gt;• date – date string&lt;BR /&gt;• heap_symbol – name of the symbol used to define the heap&lt;BR /&gt;• isCppProject – boolean indicating if this is a C++ project&lt;BR /&gt;• isSlave – boolean indicating if this target is a slave – true iff is a slave core in a multicore system&lt;BR /&gt;• library_include – name of the library include file&lt;BR /&gt;• libtype – C library type&lt;BR /&gt;• memory_include – name of the memory include file&lt;BR /&gt;• mtb_supported – boolean indicating if mtb is supported for this target&lt;BR /&gt;• numCores – number of cores in this target&lt;BR /&gt;• procName – the name of the target processor&lt;BR /&gt;• project – the name of the project&lt;BR /&gt;• script – name of the script file&lt;BR /&gt;• slaveName – is the name of the slave (only present for slaves)&lt;BR /&gt;• stack_section – the name of the section where the stack is to be placed&lt;BR /&gt;• start_symbol – the name of the start symbol (entry point)&lt;BR /&gt;• scriptType – the type of script being generated (one of “script”, “memory”, or “library”)&lt;BR /&gt;• text_align – alignment for .text section&lt;BR /&gt;• version – product version string&lt;BR /&gt;• workspace_loc – workspace directory&lt;BR /&gt;• year – the year (extracted from the date)&lt;BR /&gt;Extended variables&lt;BR /&gt;Two ‘extended’ variables are available:&lt;BR /&gt;environment&lt;BR /&gt;• The environment variable makes the host Operating System environment variables available.&lt;BR /&gt;For example, the Path variable is available as ${environment[“Path”]}.&lt;BR /&gt;Note Environment variables are case sensitive.&lt;/P&gt;&lt;P&gt;systemProperties&lt;BR /&gt;• The Java system properties are available through the systemProperties variable. For example&lt;BR /&gt;the “os.name” system property is available as ${systemProperties[“os.name”]}. Note: System&lt;BR /&gt;properties are case sensitive.&lt;BR /&gt;Outputting variables&lt;BR /&gt;A list of all predefined variables and their values can be output to the generated linker script&lt;BR /&gt;by setting the Preference: MCUXpresso IDE -&amp;gt; Default Tool settings -&amp;gt; … and list predefined&lt;BR /&gt;variables in the script&lt;BR /&gt;A list of extended variables and their values can be output to the generated linker script by&lt;BR /&gt;creating a linkscripts/user.ldt file in the project with the content&lt;BR /&gt;&amp;lt;#assign listvarsext=true&amp;gt;&lt;BR /&gt;(This is likely to be used less often, hence the slightly longer winded method of specifying the&lt;BR /&gt;option)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 17:02:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860936#M34269</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2019-04-25T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860937#M34270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to modify the linker script in anyway to add code to a specific section. The standard script will do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read chapter 17 of the user manual.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf" title="https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf"&gt;https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Especially 17.8 and 17.11.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 18:06:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860937#M34270</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-04-25T18:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use both flash banks in LPC18S37?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860938#M34271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Soledad and Con Verse,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the very detailed and helpful explanation! I will study it accurately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By Wolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 12:03:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-use-both-flash-banks-in-LPC18S37/m-p/860938#M34271</guid>
      <dc:creator>nxp68994</dc:creator>
      <dc:date>2019-05-06T12:03:45Z</dc:date>
    </item>
  </channel>
</rss>

