<?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: Debug in External RAM - APF28 board in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266547#M27835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I just meet similiar problem with cache enabled before, as the virtual space maybe cahced, so in a not well protect environment, this will cause random abnormal operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 08:31:00 GMT</pubDate>
    <dc:creator>hake</dc:creator>
    <dc:date>2013-02-21T08:31:00Z</dc:date>
    <item>
      <title>Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266544#M27832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I bought a APF28 board from &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.armadeus.com%2F" rel="nofollow" target="_blank"&gt;www.armadeus.com&lt;/A&gt; which has iMX286. It has 128KB of on-chip RAM (OCRAM) (from address 0x00000000) and 128MB of External RAM (from address 0x40000000).&lt;/P&gt;&lt;P&gt;I have been writing some bare-metal applications on it (timer interrupt, serial port, IO) using GNU ARM toolschain. These applications work fine in OCRAM and now I want to run them in External RAM. These programs will run through following steps:&lt;/P&gt;&lt;P&gt;1. Load binary to Externl RAM at 0x40000000&lt;/P&gt;&lt;P&gt;2. A piece of code in startup will copy 64 bytes of exception vectors from 0x40000000 to 0x00000000, here is the code to do this task:&lt;/P&gt;&lt;P&gt;/* Copy vector table from RAM to OCRAM */&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; r8, #0x40000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; r9, #0x0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldmia&amp;nbsp;&amp;nbsp;&amp;nbsp; r8!, {r0-r7}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmia&amp;nbsp;&amp;nbsp;&amp;nbsp; r9!, {r0-r7}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldmia&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r8!, {r0-r7}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmia&amp;nbsp;&amp;nbsp;&amp;nbsp; r9!, {r0-r7}&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. Initialize stacks and load main function&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I face a problem of unstable execution. I means, some time, it works properly but some time it work wrong or does not work at all.&lt;/P&gt;&lt;P&gt;Could you suggest me any idea to solve this problem?&lt;/P&gt;&lt;P&gt;(Please find attached for startup code and linker script that I use for two cases: run in On-chip RAM and run in External-RAM)&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335917"&gt;linker_OCRAM.lds.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335917"&gt;startup_OCRAM.s.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335917"&gt;startup_RAM.s.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335917"&gt;linker_RAM.lds.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 03:00:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266544#M27832</guid>
      <dc:creator>thuanpham</dc:creator>
      <dc:date>2013-02-21T03:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266545#M27833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you to look and the uboot code for using &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;External-RAM. do you enable the cache?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 07:10:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266545#M27833</guid>
      <dc:creator>hake</dc:creator>
      <dc:date>2013-02-21T07:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266546#M27834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Yong Huang. I will check the code of Uboot. Normally, I don't configure the cache. When I use the J-Link to check, my configuration is: MMU off, I-cache on and D-cache off. Could you explain me more about the role of Cache in my case? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 07:24:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266546#M27834</guid>
      <dc:creator>thuanpham</dc:creator>
      <dc:date>2013-02-21T07:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266547#M27835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I just meet similiar problem with cache enabled before, as the virtual space maybe cahced, so in a not well protect environment, this will cause random abnormal operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 08:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266547#M27835</guid>
      <dc:creator>hake</dc:creator>
      <dc:date>2013-02-21T08:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266548#M27836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems you are missing to initialize the external RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also suggest that you use U-boot, which already takes care of this and launch your application from U-boot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DDR is initialized at this file:&lt;/P&gt;&lt;P&gt;&lt;A href="http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c;h=f8392f6398a20d48379efca2041fdcb349cb5197;hb=HEAD" title="http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c;h=f8392f6398a20d48379efca2041fdcb349cb5197;hb=HEAD"&gt;git.denx.de Git - u-boot.git/blob - arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 17:21:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266548#M27836</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2013-02-21T17:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266549#M27837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Fabio. The source code for initializing DDR is really useful. Normally, I use U-boot to launch the application using the following command:&lt;/P&gt;&lt;P&gt;tftp 0x40000000 app.bin; go 0x40000000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 01:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266549#M27837</guid>
      <dc:creator>thuanpham</dc:creator>
      <dc:date>2013-02-22T01:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Debug in External RAM - APF28 board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266550#M27838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use mainline U-boot, then DDR initialization is taken care by U-boot and you don't need to be concerned about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the mx28 U-boot from Freescale, the DDR initialization is done by the bootlets code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 12:45:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Debug-in-External-RAM-APF28-board/m-p/266550#M27838</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2013-02-22T12:45:08Z</dc:date>
    </item>
  </channel>
</rss>

