<?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>CodeWarrior for QorIQのトピックRe: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1394913#M7085</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;FYI: Another option to consider is GCC toolchain with VLE support - S32 Design Studio for Power.&lt;/P&gt;
&lt;P&gt;This might be easier migration path if the team is using older GCC.&lt;/P&gt;
&lt;P&gt;See the release details here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-for-Power-Architecture-v2-1-Windows-Linux/ta-p/1123875" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-for-Power-Architecture-v2-1-Windows-Linux/ta-p/1123875&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There is also separate community space for S32 Design Studio:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;MPC5643L&amp;nbsp; (lockstep mode) is supported by project wizard/debugger :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_1-1641397475460.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/166785i70C9163554279E00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_1-1641397475460.png" alt="stanish_1-1641397475460.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 15:44:55 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2022-01-05T15:44:55Z</dc:date>
    <item>
      <title>How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1388956#M7076</link>
      <description>&lt;P&gt;When you have a flash based microcontroller the DEFAULT behaviour&lt;BR /&gt;is that the initialization code initializes the data section from a copy in flash.&lt;BR /&gt;&lt;SPAN&gt;To my surprise, this does not appear to be the case when compiling with Codewarrior.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Why is this not documented?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I can see that the table for the __init_data is generated (_rom_copy_info).&lt;BR /&gt;It only contains entries where source and destination are the same&lt;BR /&gt;so nothing happens when this is called.&lt;/P&gt;&lt;P&gt;If I put ".data" in flash, then data variables are linked to flash.&lt;/P&gt;&lt;P&gt;If I put ".data" in internal RAM, then data variables are linked to RAM,&lt;BR /&gt;and the S-Record file will not put them in flash, it will put the data section in SRAM.&lt;/P&gt;&lt;P&gt;If I try to enable the "Generate ROM image", then I get all kinds of error/warnings about overlapping sections.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Why do I get warnings, and how do I get rid of them?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;How do I set the ROM address?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;There is no good explanation about the _rom_copy_info table.&lt;BR /&gt;I assume that the source and size comes from the segments.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;What mechanism sets the destination?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There are LOAD, BIND and ADDR commands to the linker.&lt;BR /&gt;The difference between these are not clear to me.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Please explain the difference?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The documentation describes in detail how to prevent copying (using LOAD),&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Why not describe in detail how to copy?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of segments at 0x0000..0xCFF.&lt;/P&gt;&lt;P&gt;The .text segment starts at 0xD00.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;What do I set the ROM address to avoid getting overlap warnings?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I.E: "Overlap of the ROM image address of .bam section with executable address of .text section"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 18:37:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1388956#M7076</guid>
      <dc:creator>emagii</dc:creator>
      <dc:date>2021-12-17T18:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1389442#M7077</link>
      <description>&lt;P&gt;What processor are you using?&lt;/P&gt;
&lt;P&gt;Which version CodeWarrior are you using?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 09:12:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1389442#M7077</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-12-20T09:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1389542#M7079</link>
      <description>&lt;P&gt;We are using the MPX5643L.&lt;BR /&gt;CodeWarrior 11.1 Special Edition.&lt;/P&gt;&lt;P&gt;I am currently working on a bootloader which will fit into 128 kB.&lt;BR /&gt;The rest of the team is using an older GCC, but since we are running out of code space,&lt;BR /&gt;the VLE functionality of the CodeWarrior is interesting.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 12:57:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1389542#M7079</guid>
      <dc:creator>emagii</dc:creator>
      <dc:date>2021-12-20T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1390169#M7081</link>
      <description>&lt;P&gt;&lt;FONT color="#3366FF"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;Let me answer your questinons below:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When you have a flash based microcontroller the DEFAULT behaviour&lt;BR /&gt;is that the initialization code initializes the data section from a copy in flash.&lt;BR /&gt;&lt;SPAN&gt;To my surprise, this does not appear to be the case when compiling with Codewarrior.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Why is this not documented?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;[NXP] This is actually the default configuration for the project created by the wizard - FLASH build configuration:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_2-1640084210126.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/165832iBA896B95BF1566E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_2-1640084210126.png" alt="stanish_2-1640084210126.png" /&gt;&lt;/span&gt;&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="stanish_1-1640084167095.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/165831i94616054B5625883/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_1-1640084167095.png" alt="stanish_1-1640084167095.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can see that the table for the __init_data is generated (_rom_copy_info).&lt;BR /&gt;It only contains entries where source and destination are the same&lt;BR /&gt;so nothing happens when this is called.&lt;/P&gt;
&lt;P&gt;If I put ".data" in flash, then data variables are linked to flash.&lt;/P&gt;
&lt;P&gt;If I put ".data" in internal RAM, then data variables are linked to RAM,&lt;BR /&gt;and the S-Record file will not put them in flash, it will put the data section in SRAM.&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&lt;FONT color="#3366FF"&gt;[NXP] seems you are building RAM instead of FLASH build configuration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;&lt;FONT color="#3366FF"&gt;If you select FLASH configuration Generated S-record contains only FLASH content.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;If I try to enable the "Generate ROM image", then I get all kinds of error/warnings about overlapping sections.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Why do I get warnings, and how do I get rid of them?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;How do I set the ROM address?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;[NXP:] I assume you are basically adjusting RAM build configuration to be ROM/FLASH based. Such a change requires a different linker command file and therefore you may see many overlap warning.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;ROM Address should match with start address of your main flash block. Linker puts all the global data that needs to be initialized at the end of code block of this section. so in the example above the address is 0x30000 (see the linker file screenshot)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There is no good explanation about the _rom_copy_info table.&lt;BR /&gt;I assume that the source and size comes from the segments.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT color="#000000"&gt;What mechanism sets the destination?&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;[NXP] Actually the destination address comes from the memory segment definitions (for RAM sections e.g. .data it is RAM address). The source address (when Rom image is enabled) is generated by the linker and it is the address of flash copy of this section typically placed at the end of main flash block content. You can explicitly define the source address by LOAD linker command. In Ideal case you don't have to care about _rom_copy_info table. It is generated by the linker based on .lcf file.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;There are LOAD, BIND and ADDR commands to the linker.&lt;BR /&gt;The difference between these are not clear to me.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Please explain the difference?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;[NXP] &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;LOAD: explicitly set where the rom image of a section should be placed into&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;ADDR: just returns the real start address of a section&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;BIND: defines absolute address placement of the section (kind of redundant functionality as AT command&amp;nbsp; e.g."&amp;nbsp;&lt;EM&gt;&amp;gt;internal_flash"&lt;/EM&gt;&amp;nbsp;at the end of section definiton). Not often used due to redundancy.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The documentation describes in detail how to prevent copying (using LOAD),&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Why not describe in detail how to copy?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;Please check the compiler manual "" chapter 13 and 14". some examples are described there.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;To prevent copying simply set the load address of the section using LOAD linker command to the same as destination address e.g. see the reset boot word example below:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;MEMORY
{
  resetvector: org = 0x00000000, len = 0x00000010
 ...
}

SECTIONS
{
.__bam_bootarea LOAD (ADDR(resetvector)): {} &amp;gt; resetvector
...&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;source and destination addresses are equal = there is no copydown at startup. this section is placed into flash.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I have a number of segments at 0x0000..0xCFF.&lt;/P&gt;
&lt;P&gt;The .text segment starts at 0xD00.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;What do I set the ROM address to avoid getting overlap warnings?&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I.E: "Overlap of the ROM image address of .bam section with executable address of .text section"&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;[NXP] Take a look into memory blocks defined and set the one that .text is placed into as as ROM address. If it does not help please share your lcf file with us and we will suggest correct placement.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;Some more Tips below:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;ROM Image and RAM buffer addresses should be the same - it disables RAM buffering required by some obsolete PPC flash programmers. The address should point at the start address of your main flash section (this is usually the biggest flash block where code .text is placed into) and ROM sections are automatically placed at the end of used memory block of this section.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;Every section from the linker command file generates it's ROM block if ROM generation is enabled.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;The exception is the main flash block where start address matches with ROM image address.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;So if there are multiple ROM/flash sections you shall "disable" creation of ROM sections for them by setting its ROM addresses to be same as the start address. e.g. interrupts_flash below:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;MEMORY
{
    interrupts_flash:      org = 0x00040000,   len = 0x00001000 
    internal_flash:        org = 0x00041000,   len = 0x00010000
    internal_ram:          org = 0x40006000,   len = 0x00001000
    stack_p1 :             org = 0x40007000,   len = 0x00000800 /* z0 Stack */
}

SECTIONS
{
    GROUP : {
      .ivor_branch_table_p1 (VLECODE) LOAD (ADDR(interrupts_flash))   : {}  //set LOAD address to 0x400000
      .intc_hw_branch_table_p1 LOAD (_e_ivor_branch_table_p1): {}   //set LOAD address to 0x400000 + size of previous section using linker generated symbol _e_ivor_branch_table_p1
      .__exception_handlers_p1 (VLECODE) LOAD (_e_intc_hw_branch_table_p1) : {}
    } &amp;gt; interrupts_flash

GROUP  : {
      .init : {}

      .init_vle (VLECODE) : {
        *(.init)
        *(.init_vle)
      }
      .text : {}

      .text_vle (VLECODE) : {
         *(.text)
         *(.text_vle)
       }

       .rodata (CONST) : {
         *(.rdata)
         *(.rodata)
       }
       .ctors : {}
       .dtors : {}
       extab : {}
       extabindex : {}
       Rom_addr_start = .;   //define a custom symbol - the start address where linker places the section images (not required)
    } &amp;gt; internal_flash

 GROUP : {
       .data   : {}   // ROM image of this section is stored at the next free address in internal_flash
       .bss   : {}
       .myRAM   : {}
...      

&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;If you would like to set the ROM address of particular section manually you can use LOAD()command which probably best fits with AT command.&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;.data LOAD(0x00001000): {} &amp;gt; internal_ram //ROM address = 0x1000; RAM address 0x40006000&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;Instead of hardcoded address you can use commands e.g. ROMADDR or ADDR(). See the CodeWarrior build tools reference manual for more info about the commands.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;The linker generates the initialization structures _rom_copy_info, _bss_init_info which are used by the default startup to perform ROM to RAM copydown + bss sections set to zero.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;The linker also generates section start address/end address/ROM address for each section in .lcf (see the generated .map file):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;e.g. for .data these symbols are available:&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;_f_data 40006000
_f_data_rom 00041770
_e_data 40006010&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;You can use these structures/symbols or create your own address symbols in .lcf.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366FF"&gt;For more information I'd recommend you to see the Build tools reference manual ("&amp;lt;CW MCU v11.0&amp;gt;\MCU\Help\PDF\MCU_Power-Architecture_Compiler.pdf&amp;nbsp;"), section "Building a ROM Image".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 11:50:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1390169#M7081</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2021-12-21T11:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1390230#M7082</link>
      <description>&lt;P&gt;Sorry, but my changes are based on the &lt;STRONG&gt;FLASH&lt;/STRONG&gt; configuration, not the RAM configuration.&lt;/P&gt;&lt;P&gt;I have now gotten it to work, but the functionality is non-intuitive and error prone.&lt;BR /&gt;I think you should update the documentation and explain in detail how&lt;BR /&gt;the ROM image functionality works, or better&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;replace it with something easily understandable&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;I see nowhere in the documentation how to select the "ROM image address" and "RAM address".&lt;/STRONG&gt;&lt;BR /&gt;The documentation refers to flash programmers. That is irrelevant for most people.&lt;BR /&gt;&lt;STRONG&gt;I see nowhere in the documentation that when you select the "ROM image address" you&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;have to manually force all the other sections to an address.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The LOAD statements appears to be redundant, it is not clear that they are not.&lt;/P&gt;&lt;P&gt;============================&lt;/P&gt;&lt;P&gt;The only thing that should be needed is to tag the initialized data sections&amp;nbsp;&lt;/P&gt;&lt;P&gt;I.E: something like:&lt;/P&gt;&lt;P&gt;GROUP {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;.data :{}&amp;nbsp; &amp;lt; internal_flash&lt;/P&gt;&lt;P&gt;} &amp;gt; internal_ram&lt;/P&gt;&lt;P&gt;or using your syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;.data LOAD(0x3800) :{} &amp;gt; internal_ram&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This has enough information to place the data and to create the _rom_copy_info.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you specify that the data section should be in internal ram and loaded from 0x00003800&lt;BR /&gt;in this way, then the S-Record file will end like this:&lt;BR /&gt;&lt;BR /&gt;S315000031780100000000080000000400000100000033&lt;BR /&gt;S31500003188000C000000040000422D50535832302D28&lt;BR /&gt;S3150000319853504335363433324D4C5131000000001C&lt;BR /&gt;S31540000C004000143800000000000000000000000012&lt;BR /&gt;S31540000C100000471100000000000000000000000036&lt;BR /&gt;S31540000C20000000000000000000000000000000007E&lt;BR /&gt;S30940000C30FF0000007B&lt;BR /&gt;S7050000069460&lt;/P&gt;&lt;P&gt;The .data section is present in the S-Record file, but it is not located at 0x3800.&lt;BR /&gt;It is located at "0x40000C00" which is where my "internal_ram" starts.&lt;BR /&gt;Obviously, it is not going to work to flash such a file.&lt;/P&gt;&lt;P&gt;I consider this to be a bug.&lt;/P&gt;&lt;P&gt;As a comparison, the IAR C compiler handles ".data" in the following way:&lt;/P&gt;&lt;P&gt;initialize by copy { readwrite };&lt;BR /&gt;place in RAM_region { readwrite};&lt;/P&gt;&lt;P&gt;This is much less complex than your implementation.&lt;/P&gt;&lt;P&gt;Still, I have gotten it to work now but this has taken me a lot of time.&lt;BR /&gt;You should seriously think about your implementation.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 15:32:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1390230#M7082</guid>
      <dc:creator>emagii</dc:creator>
      <dc:date>2021-12-21T15:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How copy data segment from FLASH to RAM using _rom_copy_info?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1394913#M7085</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;FYI: Another option to consider is GCC toolchain with VLE support - S32 Design Studio for Power.&lt;/P&gt;
&lt;P&gt;This might be easier migration path if the team is using older GCC.&lt;/P&gt;
&lt;P&gt;See the release details here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-for-Power-Architecture-v2-1-Windows-Linux/ta-p/1123875" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-for-Power-Architecture-v2-1-Windows-Linux/ta-p/1123875&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There is also separate community space for S32 Design Studio:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;MPC5643L&amp;nbsp; (lockstep mode) is supported by project wizard/debugger :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stanish_1-1641397475460.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/166785i70C9163554279E00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stanish_1-1641397475460.png" alt="stanish_1-1641397475460.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:44:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/How-copy-data-segment-from-FLASH-to-RAM-using-rom-copy-info/m-p/1394913#M7085</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2022-01-05T15:44:55Z</dc:date>
    </item>
  </channel>
</rss>

