<?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>MCUXpresso IDEのトピックRe: Modifying linker scripts in MCUXpresso</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762304#M2136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also found this thread, which is highly relevant:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/451695"&gt;In MCUXpresso I cannot set up the BCA anymore&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main point is that I should be using Memory Editor (Project =&amp;gt; Properties =&amp;gt; C/C++ Build =&amp;gt; MCU settings =&amp;gt; Memory Details) to create the new section(s).&amp;nbsp; Further hints are given in:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating Code and Data Using the MCUXpresso IDE.pdf" title="https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating%20Code%20and%20Data%20Using%20the%20MCUXpresso%20IDE.pdf"&gt;https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating%20Code%20and%20Data%20Using%20the%20MC…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2018 19:59:08 GMT</pubDate>
    <dc:creator>robertpoor</dc:creator>
    <dc:date>2018-06-14T19:59:08Z</dc:date>
    <item>
      <title>Modifying linker scripts in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762299#M2131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've recently switched from KDS to MCUXpresso, but I'm stumped on how to modify the load map.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically: in KDS, to support a flash-resident bootloader in low memory, I modified the memory areas in MKL27Z64xxx4_flash.ld from its default:&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE&gt;MEMORY
{
 m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000200
 m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
 m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0000FBF0
 m_data (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000
 m_usb_sram (RW) : ORIGIN = 0x400FE000, LENGTH = 0x00000200
}&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;to look like this. Note that the BCA starts at 0x43c0 and m_text at 0x4400, and I've added a "BootloaderConfig" section:&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="border: inherit solid inherit; font-size: inherit; padding: 5px;"&gt;&lt;PRE&gt;MEMORY
{
 m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000200
 m_bootloader_config (RX) : ORIGIN = 0x43C0, LENGTH = 0x0040
 m_text (RX) : ORIGIN = 0x00004400, LENGTH = 0x0000B800
 m_data (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000
 m_usb_sram (RW) : ORIGIN = 0x400FE000, LENGTH = 0x00000200
}
SECTIONS
{
 ...
 .bca :
 {
 . = ALIGN(4);
 KEEP(*(.BootloaderConfig)) /* Bootloader Configuration Area (BCA) */
 . = ALIGN(4);
 } &amp;gt; m_bootloader_config
...
}&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I could use &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;__attribute__((section(".BootloaderConfig")))&lt;/SPAN&gt; in my code to initialize the BCA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, with the new Managed Linker system in MCUXpresso, the .ld files are evidently automatically generated by "Freemarker", so it would be a Bad Idea to modify the generated files directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm stumped as to how to tell Freemarker to make the corresponding changes.&amp;nbsp;&amp;nbsp;Are there examples of how to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:27:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762299#M2131</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2018-06-07T14:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying linker scripts in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762300#M2132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To start with, my suggest you read chapter 16 of the User Guide...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:47:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762300#M2132</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2018-06-07T15:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying linker scripts in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762301#M2133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already read chapter 16 and I'm still stumped.&amp;nbsp; I saw nothing in there about how to create new sections other than editing the .ldt templates.&amp;nbsp; But there are no .ldt files in my project nor in my SDK.&amp;nbsp; (What am I missing?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could uncheck Properties =&amp;gt; C/C++ Build =&amp;gt; Settings =&amp;gt; Managed Linker Script =&amp;gt; "Manage Linker script" and go back to doing the old-school way.&amp;nbsp; But I prefer to work with the tools than disable them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌: can you be a little more specific about how to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 17:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762301#M2133</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2018-06-07T17:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying linker scripts in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762303#M2135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heh.&amp;nbsp; I *almost* put a note to the effect that "Erich has probably already done this but..." but I'd only seen your note from 2012 (&amp;nbsp;&lt;A class="link-titled" href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;Defining Variables at Absolute Addresses with gcc | MCU on Eclipse&lt;/A&gt;&amp;nbsp;), so I wasn't sure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The section on "Custom Linker Files" is just what's needed -- thanks very much for the updated blog entry!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 17:38:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762303#M2135</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2018-06-07T17:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying linker scripts in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762304#M2136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also found this thread, which is highly relevant:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/451695"&gt;In MCUXpresso I cannot set up the BCA anymore&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main point is that I should be using Memory Editor (Project =&amp;gt; Properties =&amp;gt; C/C++ Build =&amp;gt; MCU settings =&amp;gt; Memory Details) to create the new section(s).&amp;nbsp; Further hints are given in:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating Code and Data Using the MCUXpresso IDE.pdf" title="https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating%20Code%20and%20Data%20Using%20the%20MCUXpresso%20IDE.pdf"&gt;https://community.nxp.com/servlet/JiveServlet/download/911737-1-404912/Relocating%20Code%20and%20Data%20Using%20the%20MC…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:59:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Modifying-linker-scripts-in-MCUXpresso/m-p/762304#M2136</guid>
      <dc:creator>robertpoor</dc:creator>
      <dc:date>2018-06-14T19:59:08Z</dc:date>
    </item>
  </channel>
</rss>

