<?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: Code for reset ram in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582876#M25628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Tue Jun 08 23:22:33 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;Incorrect. You can set a breakpoint here, just as you can elsewhere in your code.&lt;BR /&gt;&lt;BR /&gt;There are various ways of doing this, but the simplest is probably just to open the file in the editor view, scroll down to the definition of ResetISR and then double click on the left hand side of the view. When you next load/reload the application, you should then stop when ResetISR starts to execute.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;CodeRedSupport&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OK the break function and the routine run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At this point I still&amp;nbsp; doubt the need to clear a variable in its definition that gave me&amp;nbsp; problems. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But that's another story . . . .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:42:37 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:42:37Z</dc:date>
    <item>
      <title>Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582868#M25620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Mon Jun 07 07:41:32 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have a simple code for reset ram in C for 1758.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This code have a warning error [COLOR=#000000]obviously[/COLOR]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void InitRAM (void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; uint32_t *Add=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Add = 0x10008000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; while (Add &amp;gt; 0x10000000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add --;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Add = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582868#M25620</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582869#M25621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by domen on Mon Jun 07 10:12:52 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You ran over your stack (which might contain Add, stacked registers etc.) :D&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You also ran over .data section&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this to clear only stuff below the stack:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t *Add;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Add = (uint32_t*)&amp;amp;Add&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You didn't say what you're trying to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582869#M25621</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582870#M25622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Mon Jun 07 23:49:05 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: domen&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;You didn't say what you're trying to do.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to reset all ram variable before start the application main&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582870#M25622</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582871#M25623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Jun 08 00:03:18 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: blasiis&lt;/STRONG&gt;&lt;BR /&gt;I need to reset all ram variable before start the application main&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use the standard startup code created by the project wizard (cr_startup_lpc17.c), this contains code that will automatically copy data with initial values from flash into RAM (.data), and dynamically create zero initialised data (.bss). It does this using symbols automatically created by the linker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582871#M25623</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582872#M25624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Tue Jun 08 01:40:19 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;If you use the standard startup code created by the project wizard (cr_startup_lpc17.c), this contains code that will automatically copy data with initial values from flash into RAM (.data), and dynamically create zero initialised data (.bss). It does this using symbols automatically created by the linker.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok is this, but it isn't called from main&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ResetISR(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned long *pulSrc, *pulDest;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Copy the data segment initializers from flash to SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pulSrc = &amp;amp;_etext;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(pulDest = &amp;amp;_data; pulDest &amp;lt; &amp;amp;_edata; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *pulDest++ = *pulSrc++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582872#M25624</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582873#M25625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Jun 08 02:03:00 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: blasiis&lt;/STRONG&gt;&lt;BR /&gt;Ok is this, but it isn't called from main&lt;BR /&gt;&lt;BR /&gt;ResetISR(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Correct. It is ResetISR() that calls main() !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cr_startup_lpc17xx.c places the address of ResetISR into the second location in the Cortex-M3's vector table - which is the location the processor will start execution from as it comes out of reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ResetISR() then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Copies RW data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Creates BSS data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Calls CMSIS SystemInit() function (if appropriate)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Optionally calls C++ init code (not applicable in LPCXpresso which supports only C)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Calls main() - either directly, or via Redlib C library initialisation function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582873#M25625</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582874#M25626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Tue Jun 08 05:37:37 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;Correct. It is ResetISR() that calls main() !&lt;BR /&gt;&lt;BR /&gt;cr_startup_lpc17xx.c places the address of ResetISR into the second location in the Cortex-M3's vector table - which is the location the processor will start execution from as it comes out of reset.&lt;BR /&gt;&lt;BR /&gt;ResetISR() then&lt;BR /&gt;- Copies RW data&lt;BR /&gt;- Creates BSS data&lt;BR /&gt;- Calls CMSIS SystemInit() function (if appropriate)&lt;BR /&gt;- Optionally calls C++ init code (not applicable in LPCXpresso which supports only C)&lt;BR /&gt;- Calls main() - either directly, or via Redlib C library initialisation function.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I cannot insert a break in ResetISR routine, correct ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582874#M25626</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582875#M25627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Tue Jun 08 08:28:04 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: blasiis&lt;/STRONG&gt;&lt;BR /&gt;I cannot insert a break in ResetISR routine, correct ?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Incorrect. You can set a breakpoint here, just as you can elsewhere in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are various ways of doing this, but the simplest is probably just to open the file in the editor view, scroll down to the definition of ResetISR and then double click on the left hand side of the view. When you next load/reload the application, you should then stop when ResetISR starts to execute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582875#M25627</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Code for reset ram</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582876#M25628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by blasiis on Tue Jun 08 23:22:33 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;Incorrect. You can set a breakpoint here, just as you can elsewhere in your code.&lt;BR /&gt;&lt;BR /&gt;There are various ways of doing this, but the simplest is probably just to open the file in the editor view, scroll down to the definition of ResetISR and then double click on the left hand side of the view. When you next load/reload the application, you should then stop when ResetISR starts to execute.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;CodeRedSupport&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OK the break function and the routine run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At this point I still&amp;nbsp; doubt the need to clear a variable in its definition that gave me&amp;nbsp; problems. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But that's another story . . . .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-for-reset-ram/m-p/582876#M25628</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:42:37Z</dc:date>
    </item>
  </channel>
</rss>

