<?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 (MPC5674F) How to normally allocate all program variable data to external memory? in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-How-to-normally-allocate-all-program-variable-data-to/m-p/708829#M9166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Development environment:&lt;BR /&gt;- Code Warrior IDE version 5.9.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am developing using the MPC5674F. The target board is equipped with external memory (SRAM).&lt;/P&gt;&lt;P&gt;In order to allocate all program variable data to external memory (SRAM), I modified the code in the LCF file as follows:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* File name : MPC5674F_MVx264.lcf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; ......&lt;BR /&gt; // Add External Memory area&lt;BR /&gt; EXSRAM : org = 0x20000000, len = 0x001FFFFF&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; ......&lt;BR /&gt; // Delete program data allocation default code&lt;BR /&gt; /* &lt;BR /&gt; GROUP : {&lt;BR /&gt; &lt;BR /&gt; .__uninitialized_intc_handlertable ALIGN(20) : {}&lt;/P&gt;&lt;P&gt;.data : {}&lt;BR /&gt; .sdata : {}&lt;BR /&gt; .sbss : {}&lt;BR /&gt; .sdata2 : {}&lt;BR /&gt; .sbss2 : {}&lt;BR /&gt; .bss : {}&lt;BR /&gt; } &amp;gt; internal_ram&lt;BR /&gt; */&lt;BR /&gt; &lt;BR /&gt; // Add program data allocation code&lt;/P&gt;&lt;P&gt;GROUP : {&lt;BR /&gt; &lt;BR /&gt; .__uninitialized_intc_handlertable ALIGN(20) : {}&lt;/P&gt;&lt;P&gt;.data : {}&lt;BR /&gt; .sdata : {}&lt;BR /&gt; .sbss : {}&lt;BR /&gt; .sdata2 : {}&lt;BR /&gt; .sbss2 : {}&lt;BR /&gt; .bss : {}&lt;BR /&gt; } &amp;gt; EXSRAM&lt;/P&gt;&lt;P&gt;.......&lt;BR /&gt; ......&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And then, I modified the code to do setting EBI (External BUS Interface) as follows.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*&amp;nbsp;File name : __PPC_eabi_init.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asm void __init_user(void)&lt;BR /&gt;{&lt;BR /&gt; .....&lt;BR /&gt; .....&lt;BR /&gt;// Call SetExternalBusInterface() function for External Bus Interface initialization&lt;BR /&gt; bl SetExternalBusInterface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;frfree&lt;BR /&gt; blr&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;After, The build was done well and I confirmed that variables are allocated in the external memory (SRAM) using the debugger and map file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the variable values was not initialized and the garbage value was stored.&lt;BR /&gt;I want to know what's wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to normally allocate all program variable data to external memory?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Aug 2017 05:53:51 GMT</pubDate>
    <dc:creator>chunghohwang</dc:creator>
    <dc:date>2017-08-28T05:53:51Z</dc:date>
    <item>
      <title>(MPC5674F) How to normally allocate all program variable data to external memory?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-How-to-normally-allocate-all-program-variable-data-to/m-p/708829#M9166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Development environment:&lt;BR /&gt;- Code Warrior IDE version 5.9.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am developing using the MPC5674F. The target board is equipped with external memory (SRAM).&lt;/P&gt;&lt;P&gt;In order to allocate all program variable data to external memory (SRAM), I modified the code in the LCF file as follows:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* File name : MPC5674F_MVx264.lcf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; ......&lt;BR /&gt; // Add External Memory area&lt;BR /&gt; EXSRAM : org = 0x20000000, len = 0x001FFFFF&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; ......&lt;BR /&gt; // Delete program data allocation default code&lt;BR /&gt; /* &lt;BR /&gt; GROUP : {&lt;BR /&gt; &lt;BR /&gt; .__uninitialized_intc_handlertable ALIGN(20) : {}&lt;/P&gt;&lt;P&gt;.data : {}&lt;BR /&gt; .sdata : {}&lt;BR /&gt; .sbss : {}&lt;BR /&gt; .sdata2 : {}&lt;BR /&gt; .sbss2 : {}&lt;BR /&gt; .bss : {}&lt;BR /&gt; } &amp;gt; internal_ram&lt;BR /&gt; */&lt;BR /&gt; &lt;BR /&gt; // Add program data allocation code&lt;/P&gt;&lt;P&gt;GROUP : {&lt;BR /&gt; &lt;BR /&gt; .__uninitialized_intc_handlertable ALIGN(20) : {}&lt;/P&gt;&lt;P&gt;.data : {}&lt;BR /&gt; .sdata : {}&lt;BR /&gt; .sbss : {}&lt;BR /&gt; .sdata2 : {}&lt;BR /&gt; .sbss2 : {}&lt;BR /&gt; .bss : {}&lt;BR /&gt; } &amp;gt; EXSRAM&lt;/P&gt;&lt;P&gt;.......&lt;BR /&gt; ......&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And then, I modified the code to do setting EBI (External BUS Interface) as follows.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*&amp;nbsp;File name : __PPC_eabi_init.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asm void __init_user(void)&lt;BR /&gt;{&lt;BR /&gt; .....&lt;BR /&gt; .....&lt;BR /&gt;// Call SetExternalBusInterface() function for External Bus Interface initialization&lt;BR /&gt; bl SetExternalBusInterface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;frfree&lt;BR /&gt; blr&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;After, The build was done well and I confirmed that variables are allocated in the external memory (SRAM) using the debugger and map file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the variable values was not initialized and the garbage value was stored.&lt;BR /&gt;I want to know what's wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to normally allocate all program variable data to external memory?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 05:53:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-How-to-normally-allocate-all-program-variable-data-to/m-p/708829#M9166</guid>
      <dc:creator>chunghohwang</dc:creator>
      <dc:date>2017-08-28T05:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: (MPC5674F) How to normally allocate all program variable data to external memory?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5674F-How-to-normally-allocate-all-program-variable-data-to/m-p/708830#M9167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, linker file modification seems to be right, what I am not sure if it is correct, is EBI initialization in Codewarrior template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use External_SRAM_init function I have written in following example code in main file:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-102744"&gt;Example XPC567XFKIT PinToggleStationery CW210&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 10:13:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5674F-How-to-normally-allocate-all-program-variable-data-to/m-p/708830#M9167</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2017-08-29T10:13:00Z</dc:date>
    </item>
  </channel>
</rss>

