<?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 Relocating code .text .data to spifi flash and external SDRAM MCUxpresso in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728001#M54185</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to relocate code (folders with .c, .h files and .a files) in my project.&lt;BR /&gt;I readed the exampels but they are only for single funktions or variabels, so the don't fit.&lt;BR /&gt;I have BOARD SDRAM, BOARD FLASH (SPIFI Flash) and LPC54608.&lt;/P&gt;&lt;P&gt;I need to place Code(.text .data … ) in BOARD FLASH (lma) and load this code in external BOARD SDRAM (vma).&lt;/P&gt;&lt;P&gt;To test it I created a .c/.h file with a function. There result a test2.o file with .text (68byte) and .data (1Kbyte), everything in this file should go to SPIFI Flash and to runtime the .data should be loaded in SDRAM (vma).&lt;/P&gt;&lt;P&gt;With “Managed Linker Script -&amp;gt; Extra linker script input sections”&lt;BR /&gt;*test2.o(.text*) BOARD FLASH .text&lt;BR /&gt;put the linker the .text of the test2.o in BOARD_FLASH. And it works.&lt;/P&gt;&lt;P&gt;But with&lt;BR /&gt;*test2.o(.data*) BOARD SDRAM .data&lt;BR /&gt;it doesn’t work. The Linker put the *test2.o(.data*) in the LPC546008 internal Flash and load it in BOARD SDRAM.&lt;BR /&gt;Memory region Used Size Region Size %age Used&lt;BR /&gt;PROGRAM_FLASH: 11864 B 512 KB 2.26%&lt;BR /&gt;BOARD_FLASH: 68 B 16 MB 0.00%&lt;BR /&gt;SRAM_UPPER: 8476 B 160 KB 5.17%&lt;BR /&gt;SRAMX: 0 GB 32 KB 0.00%&lt;BR /&gt;USB_RAM: 0 GB 8 KB 0.00%&lt;BR /&gt;BOARD_SDRAM: 1 KB 16 MB 0.01%&lt;/P&gt;&lt;P&gt;Is there a possibility in “Properties-&amp;gt;Managed Linker Script -&amp;gt; Extra linker script input sections” to tell the linker that he have to place *test2.o(.data*) in BOARD FLASH(lma) and load this in BOARD SDRAM?&lt;BR /&gt;If possible, I would like to avoid writing my own linker script.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 11:51:30 GMT</pubDate>
    <dc:creator>A_M</dc:creator>
    <dc:date>2023-09-22T11:51:30Z</dc:date>
    <item>
      <title>Relocating code .text .data to spifi flash and external SDRAM MCUxpresso</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728001#M54185</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to relocate code (folders with .c, .h files and .a files) in my project.&lt;BR /&gt;I readed the exampels but they are only for single funktions or variabels, so the don't fit.&lt;BR /&gt;I have BOARD SDRAM, BOARD FLASH (SPIFI Flash) and LPC54608.&lt;/P&gt;&lt;P&gt;I need to place Code(.text .data … ) in BOARD FLASH (lma) and load this code in external BOARD SDRAM (vma).&lt;/P&gt;&lt;P&gt;To test it I created a .c/.h file with a function. There result a test2.o file with .text (68byte) and .data (1Kbyte), everything in this file should go to SPIFI Flash and to runtime the .data should be loaded in SDRAM (vma).&lt;/P&gt;&lt;P&gt;With “Managed Linker Script -&amp;gt; Extra linker script input sections”&lt;BR /&gt;*test2.o(.text*) BOARD FLASH .text&lt;BR /&gt;put the linker the .text of the test2.o in BOARD_FLASH. And it works.&lt;/P&gt;&lt;P&gt;But with&lt;BR /&gt;*test2.o(.data*) BOARD SDRAM .data&lt;BR /&gt;it doesn’t work. The Linker put the *test2.o(.data*) in the LPC546008 internal Flash and load it in BOARD SDRAM.&lt;BR /&gt;Memory region Used Size Region Size %age Used&lt;BR /&gt;PROGRAM_FLASH: 11864 B 512 KB 2.26%&lt;BR /&gt;BOARD_FLASH: 68 B 16 MB 0.00%&lt;BR /&gt;SRAM_UPPER: 8476 B 160 KB 5.17%&lt;BR /&gt;SRAMX: 0 GB 32 KB 0.00%&lt;BR /&gt;USB_RAM: 0 GB 8 KB 0.00%&lt;BR /&gt;BOARD_SDRAM: 1 KB 16 MB 0.01%&lt;/P&gt;&lt;P&gt;Is there a possibility in “Properties-&amp;gt;Managed Linker Script -&amp;gt; Extra linker script input sections” to tell the linker that he have to place *test2.o(.data*) in BOARD FLASH(lma) and load this in BOARD SDRAM?&lt;BR /&gt;If possible, I would like to avoid writing my own linker script.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 11:51:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728001#M54185</guid>
      <dc:creator>A_M</dc:creator>
      <dc:date>2023-09-22T11:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Relocating code .text .data to spifi flash and external SDRAM MCUxpresso</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728552#M54197</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/156878"&gt;@A_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enabling the “Plain load image” will program main code into flash, and execute in RAM:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1695616449597.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/242400i782FCE23B7C20BAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1695616449597.png" alt="Alice_Yang_0-1695616449597.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 05:49:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728552#M54197</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-09-25T05:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Relocating code .text .data to spifi flash and external SDRAM MCUxpresso</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728694#M54200</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Unfortunately it does not work because PROGRAM_FLASH is the first on the flash order.&lt;/P&gt;&lt;P&gt;PROGRAM_FLASH:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11924 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 512 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.27%&lt;BR /&gt;BOARD_FLASH:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 GB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00%&lt;BR /&gt;SRAM_UPPER:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9500 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 160 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.80%&lt;BR /&gt;SRAMX:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 GB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00%&lt;BR /&gt;USB_RAM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 GB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8 KB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00%&lt;BR /&gt;BOARD_SDRAM:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10896 B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16 MB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.06%&lt;/P&gt;&lt;P&gt;And when I change the flash order. The stays problem is the same.&lt;BR /&gt;All .data which should be store in PROGRAM_FLASH go to BOARD_FLASH.&lt;/P&gt;&lt;P&gt;I need to use internal flash(PROGRAM_FLASH) with internal ram (SRAM_UPPER).&lt;/P&gt;&lt;P&gt;Example, everything from folder “internal” .test .data should be placed in internal PROGRAM_FLASH and use internal SRAM_UPPER for .data .noinit .bss.&lt;/P&gt;&lt;P&gt;The code from folder “external” .test .data should be placed in external flash BOARD_FLASH and use external ram BOARD_SDRAM for .data .noinit .bss.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 08:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1728694#M54200</guid>
      <dc:creator>A_M</dc:creator>
      <dc:date>2023-09-25T08:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Relocating code .text .data to spifi flash and external SDRAM MCUxpresso</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1730147#M54222</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/156878"&gt;@A_M&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at:&amp;nbsp;&lt;FONT size="4"&gt;&lt;SPAN class="lia-link-navigation lia-link-disabled"&gt;How to place data/function/file in specified memory under MCUXpresso IDE&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC-How-to-place-data-function-file-in-specified-memory-under/ta-p/1316392" target="_blank"&gt;https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC-How-to-place-data-function-file-in-specified-memory-under/ta-p/1316392&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 05:31:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Relocating-code-text-data-to-spifi-flash-and-external-SDRAM/m-p/1730147#M54222</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2023-09-27T05:31:44Z</dc:date>
    </item>
  </channel>
</rss>

