<?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: How to set data flash memory in link file in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780057#M11368</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;here is document about DFLASH programming:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.nxp.com/docs/DOC-334155"&gt;https://community.nxp.com/docs/DOC-334155&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2018 14:09:03 GMT</pubDate>
    <dc:creator>jiri_kral</dc:creator>
    <dc:date>2018-02-02T14:09:03Z</dc:date>
    <item>
      <title>How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780056#M11367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am developing a software with MPC5744, and I meet a problem. I want&amp;nbsp;partition flash space, and I use 57xx_flash.ld(a link file's name) to set data section. Data can write to flash block when system initialization except Data flash memory. I want set a cal_data&amp;nbsp;section in&amp;nbsp;&lt;SPAN&gt;Data flash memory, and data write into those block&amp;nbsp;when the ship download the software, but I failed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;57xx_flash.ld&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Entry Point */&lt;BR /&gt;ENTRY(_start)&lt;/P&gt;&lt;P&gt;/* define heap and stack size */&lt;BR /&gt;__HEAP_SIZE = 0 ;&lt;BR /&gt;__STACK_SIZE = 4096 ;&lt;/P&gt;&lt;P&gt;SRAM_SIZE = 384K; &lt;BR /&gt;/* Define SRAM Base Address */&lt;BR /&gt;SRAM_BASE_ADDR = 0x40000000;&lt;/P&gt;&lt;P&gt;/* Define CPU0 Local Data SRAM Allocation */&lt;BR /&gt;LOCALDMEM_SIZE = 64K;&lt;BR /&gt;/* Define CPU0 Local Data SRAM Base Address */&lt;BR /&gt;LOCALDMEM_BASE_ADDR = 0x50800000;&lt;BR /&gt; &lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;flash_rchw : org = 0x00FA0000, len = 0x4&lt;BR /&gt; cpu0_reset_vec : org = 0x00FA0004, len = 0x4&lt;BR /&gt; &lt;BR /&gt; m_text_test : org = 0x00810000, len = 1K &lt;BR /&gt; &lt;BR /&gt; m_text : org = 0x01000000, len = 64K &lt;BR /&gt; m_data : org = 0x40000000, len = 384K&lt;BR /&gt; &lt;BR /&gt; local_dmem : org = 0x50800000, len = 64K &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; .cal_test : ALIGN(512)&lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.cal_test))&lt;BR /&gt; } &amp;gt; m_text_test&lt;BR /&gt; &lt;BR /&gt; .rchw : &lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.rchw))&lt;BR /&gt; } &amp;gt; flash_rchw&lt;/P&gt;&lt;P&gt;.cpu0_reset_vector : &lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.cpu0_reset_vector))&lt;BR /&gt; } &amp;gt; cpu0_reset_vec&lt;/P&gt;&lt;P&gt;.startup : ALIGN(0x400)&lt;BR /&gt; {&lt;BR /&gt; __start = . ;&lt;BR /&gt; *(.startup)&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; .core_exceptions_table : ALIGN(4096)&lt;BR /&gt; {&lt;BR /&gt; __IVPR_VALUE = . ;&lt;BR /&gt; KEEP(*(.core_exceptions_table))&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.intc_vector_table : ALIGN(4096)&lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.intc_vector_table))&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .text : &lt;BR /&gt; {&lt;BR /&gt; *(.text.startup)&lt;BR /&gt; *(.text) &lt;BR /&gt; *(.text.*)&lt;BR /&gt; KEEP (*(.init))&lt;BR /&gt; KEEP (*(.fini)) &lt;BR /&gt; . = ALIGN(16);&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .ctors :&lt;BR /&gt; {&lt;BR /&gt; __CTOR_LIST__ = .;&lt;BR /&gt; /* gcc uses crtbegin.o to find the start of&lt;BR /&gt; the constructors, so we make sure it is&lt;BR /&gt; first. Because this is a wildcard, it&lt;BR /&gt; doesn't matter if the user does not&lt;BR /&gt; actually link against crtbegin.o; the&lt;BR /&gt; linker won't look for a file to match a&lt;BR /&gt; wildcard. The wildcard also means that it&lt;BR /&gt; doesn't matter which directory crtbegin.o&lt;BR /&gt; is in. */&lt;BR /&gt; KEEP (*crtbegin.o(.ctors))&lt;BR /&gt; KEEP (*crtbegin?.o(.ctors))&lt;BR /&gt; /* We don't want to include the .ctor section from&lt;BR /&gt; from the crtend.o file until after the sorted ctors.&lt;BR /&gt; The .ctor section from the crtend file contains the&lt;BR /&gt; end of ctors marker and it must be last */&lt;BR /&gt; KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))&lt;BR /&gt; KEEP (*(SORT(.ctors.*)))&lt;BR /&gt; KEEP (*(.ctors))&lt;BR /&gt; __CTOR_END__ = .;&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.dtors :&lt;BR /&gt; {&lt;BR /&gt; __DTOR_LIST__ = .;&lt;BR /&gt; KEEP (*crtbegin.o(.dtors))&lt;BR /&gt; KEEP (*crtbegin?.o(.dtors))&lt;BR /&gt; KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))&lt;BR /&gt; KEEP (*(SORT(.dtors.*)))&lt;BR /&gt; KEEP (*(.dtors))&lt;BR /&gt; __DTOR_END__ = .;&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .preinit_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__preinit_array_start = .);&lt;BR /&gt; KEEP (*(.preinit_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__preinit_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.init_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__init_array_start = .);&lt;BR /&gt; KEEP (*(SORT(.init_array.*)))&lt;BR /&gt; KEEP (*(.init_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__init_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.fini_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__fini_array_start = .);&lt;BR /&gt; KEEP (*(SORT(.fini_array.*)))&lt;BR /&gt; KEEP (*(.fini_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__fini_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .rodata :&lt;BR /&gt; {&lt;BR /&gt; *(.rodata)&lt;BR /&gt; *(.rodata.*)&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .eh_frame_hdr : { *(.eh_frame_hdr) } &amp;gt; m_text&lt;BR /&gt; .eh_frame : { KEEP (*(.eh_frame)) } &amp;gt; m_text&lt;BR /&gt; &lt;BR /&gt; .data : &lt;BR /&gt; {&lt;BR /&gt; *(.data)&lt;BR /&gt; *(.data.*)&lt;BR /&gt; } &amp;gt; m_data AT&amp;gt;m_text&lt;BR /&gt; &lt;BR /&gt; .sdata2 :&lt;BR /&gt; { &lt;BR /&gt; *(.sdata2)&lt;BR /&gt; *(.sdata2.*)&lt;BR /&gt; } &amp;gt; m_data AT&amp;gt;m_text&lt;/P&gt;&lt;P&gt;.sbss2 (NOLOAD) :&lt;BR /&gt; {&lt;BR /&gt; /* _SDA2_BASE_ = .; */ &lt;BR /&gt; *(.sbss2)&lt;BR /&gt; *(.sbss2.*)&lt;BR /&gt; } &amp;gt; m_data&lt;BR /&gt; &lt;BR /&gt; .sdata :&lt;BR /&gt; {&lt;BR /&gt; *(.sdata)&lt;BR /&gt; *(.sdata.*)&lt;BR /&gt; } &amp;gt; m_data AT&amp;gt;m_text&lt;BR /&gt; &lt;BR /&gt; .bss (NOLOAD) :&lt;BR /&gt; {&lt;BR /&gt; __BSS_START = .;&lt;BR /&gt; *(.sbss)&lt;BR /&gt; *(.sbss.*) &lt;BR /&gt; *(.bss)&lt;BR /&gt; *(.bss.*)&lt;BR /&gt; *(COMMON)&lt;BR /&gt; __BSS_END = .;&lt;BR /&gt; } &amp;gt; m_data&lt;BR /&gt; &lt;BR /&gt; .stack (NOLOAD) : ALIGN(16) &lt;BR /&gt; {&lt;BR /&gt; __HEAP = . ;&lt;BR /&gt; PROVIDE (_end = . );&lt;BR /&gt; PROVIDE (end = . ); &lt;BR /&gt; . += __HEAP_SIZE ;&lt;BR /&gt; __HEAP_END = . ;&lt;BR /&gt; _stack_end = . ;&lt;BR /&gt; . += __STACK_SIZE ;&lt;BR /&gt; _stack_addr = . ;&lt;BR /&gt; __SP_INIT = . ;&lt;BR /&gt; . += 4;&lt;BR /&gt; } &amp;gt; local_dmem&lt;BR /&gt; &lt;BR /&gt;/*-------- LABELS USED IN CODE -------------------------------*/&lt;BR /&gt; &lt;BR /&gt;/* Labels for Copying Initialised Data from Flash to RAM */&lt;BR /&gt;__DATA_SRAM_ADDR = ADDR(.data);&lt;BR /&gt;__SDATA_SRAM_ADDR = ADDR(.sdata);&lt;/P&gt;&lt;P&gt;__DATA_SIZE = SIZEOF(.data);&lt;BR /&gt;__SDATA_SIZE = SIZEOF(.sdata);&lt;/P&gt;&lt;P&gt;__DATA_ROM_ADDR = LOADADDR(.data);&lt;BR /&gt;__SDATA_ROM_ADDR = LOADADDR(.sdata);&lt;BR /&gt; &lt;BR /&gt;/* Labels Used for Initialising SRAM ECC */&lt;BR /&gt;__SRAM_SIZE = SRAM_SIZE;&lt;BR /&gt;__SRAM_BASE_ADDR = SRAM_BASE_ADDR;&lt;/P&gt;&lt;P&gt;__LOCAL_DMEM_SIZE = LOCALDMEM_SIZE;&lt;BR /&gt;__LOCAL_DMEM_BASE_ADDR = LOCALDMEM_BASE_ADDR;&lt;/P&gt;&lt;P&gt;__BSS_SIZE = __BSS_END - __BSS_START; &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set a section in C file&lt;/P&gt;&lt;P&gt;__attribute__ ((section(".cal_test")))&lt;BR /&gt;const uint8_t data_p[8] = {0x1A,0x2B,0x3C,0x4D,0x5E,0x6F,0x70};&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 05:20:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780056#M11367</guid>
      <dc:creator>xuelang_ee</dc:creator>
      <dc:date>2018-02-02T05:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780057#M11368</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;here is document about DFLASH programming:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.nxp.com/docs/DOC-334155"&gt;https://community.nxp.com/docs/DOC-334155&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:09:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780057#M11368</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-02-02T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780058#M11369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanky you very much! The information you provide is very helpful to me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes to you&lt;/P&gt;&lt;P&gt;                                                                   WangJun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Feb 2018 07:14:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780058#M11369</guid>
      <dc:creator>xuelang_ee</dc:creator>
      <dc:date>2018-02-03T07:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780059#M11370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I met another problem, I set the link file as the document you offerd to me, but I can not program data flash still.&lt;/P&gt;&lt;P&gt;some errors appeared. Enclosure is my code and Algorithm file, can you help me, thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes to you                                                                                &lt;/P&gt;&lt;P&gt;Jun Wang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Feb 2018 09:03:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780059#M11370</guid>
      <dc:creator>xuelang_ee</dc:creator>
      <dc:date>2018-02-03T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780060#M11371</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;you probably forget add custom flashing algorithm - as mentioned in the doc:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44481i8D406DC353B8F7DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my result:&amp;nbsp;&lt;BR /&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/44515iEE214F921CDDAFFF/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;&lt;/P&gt;&lt;P&gt;Modified project is in attachment.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 09:10:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780060#M11371</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2018-02-05T09:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to set data flash memory in link file</title>
      <link>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780061#M11372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    I can programe dflash according to the way you told me. Last time I chose a wrong flashing algorithm, thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes to you&lt;/P&gt;&lt;P&gt;                                                                                WangJun&lt;/P&gt;&lt;P&gt;                                                                                02/06/18&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 01:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/m-p/780061#M11372</guid>
      <dc:creator>xuelang_ee</dc:creator>
      <dc:date>2018-02-06T01:47:39Z</dc:date>
    </item>
  </channel>
</rss>

