<?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>LPC MicrocontrollersのトピックRe: Debug code executing in SDRAM</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543481#M12706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 03 09:57:29 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;One way to do this would be to write a gdb script that configures your SDRAM controller by reading/writing to the registers. I would suggest:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- write your GDB script and place in a file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- open the project Launch configuration, switch to the Debugger tab and press the Edit Script... button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- in the script, immediately before the ${load} statement, add&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
source path/to/your/script/file
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GDB provides a very powerful scripting language - a web search will find lots of information. The key things are probably:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- to read a memory location on the target and assign to a variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
set $v = (unsigned int *) 0x10000000
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;- to write to a memory location&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
set *(unsigned int *)0x10000000 = 0x27
set *(unsigned int *)0x10000000 = $var
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:27:12 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:27:12Z</dc:date>
    <item>
      <title>Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543480#M12705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ajones on Tue Dec 03 07:54:47 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking at developing an environment that allows code executing from external SDRAM to be debugged.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand that that I need a debugger script that initialises the system clocks and SDRAM before attempting to perform a download and debug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an example available that allows debugging code excuting on SDRAM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is the documentation for the scripts that would allow this initialisation to performed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543480#M12705</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543481#M12706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 03 09:57:29 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;One way to do this would be to write a gdb script that configures your SDRAM controller by reading/writing to the registers. I would suggest:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- write your GDB script and place in a file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- open the project Launch configuration, switch to the Debugger tab and press the Edit Script... button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- in the script, immediately before the ${load} statement, add&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
source path/to/your/script/file
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GDB provides a very powerful scripting language - a web search will find lots of information. The key things are probably:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- to read a memory location on the target and assign to a variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
set $v = (unsigned int *) 0x10000000
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;- to write to a memory location&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
set *(unsigned int *)0x10000000 = 0x27
set *(unsigned int *)0x10000000 = $var
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543481#M12706</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543482#M12707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by John Sinclair on Tue Dec 03 22:00:50 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hardwarebreakpoints doesn't work at addresses above 1GB (0x4000 0000) in the ARM Cortex Core. Too bad that NXP design the external memory at 0x8000 0000!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So no chance to set a Hard-breakpoint in external memory&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.keil.com%2Fforum%2F20388%2F" rel="nofollow" target="_blank"&gt;http://www.keil.com/forum/20388/&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you need a Breakpoint you can set only Soft-Breakpoints&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;John&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543482#M12707</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543483#M12708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Wed Dec 04 00:47:17 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For external RAM, LPCXpresso uses Software breakpoints.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543483#M12708</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543484#M12709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bavarian on Thu Dec 05 05:00:08 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I attached a script file for the LPC4300 and the SDRAM used on the KEIL board which works for uVision + ULINK. If you have another SDRAM configuration then you need to change the code accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The concept from KEIL allows to write these script files nearly like standard C code, for other debuggers you need to convert the C code ( e.g. do { ... } while )&amp;nbsp; into other structs which can be executed by the respective debugger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Support Team&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543484#M12709</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Debug code executing in SDRAM</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543485#M12710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ajones on Thu Dec 05 07:38:48 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks but unfortunately I am using the LPCXpresso IDE (which I should have stated in my original post).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:27:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Debug-code-executing-in-SDRAM/m-p/543485#M12710</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:27:15Z</dc:date>
    </item>
  </channel>
</rss>

