<?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: Stack placed in RAM2</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678681#M27279</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="296469" data-username="markvanderheijden" href="https://community.nxp.com/people/markvanderheijden"&gt;mark van der Heijden,&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for your reply and I'd like to confirm something wih you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Whether test is the global value.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jun 2017 09:28:59 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2017-06-30T09:28:59Z</dc:date>
    <item>
      <title>Stack placed in RAM2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678678#M27276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My stack is placed at location&amp;nbsp;0x20080000 on my LPC1766. Thats&amp;nbsp;AHB SRAM - bank 1.&amp;nbsp;I like to have my stack on the&amp;nbsp;On-chip SRAM(0x10000000). my linker script is defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROVIDE(_pvHeapStart = DEFINED(__user_heap_base) ? __user_heap_base : .);&lt;BR /&gt; PROVIDE(_vStackTop = DEFINED(__user_stack_top) ? __user_stack_top : __top_RamLoc32 - 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be the reason that it still writing in RAM2(bank1)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 12:10:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678678#M27276</guid>
      <dc:creator>markvanderheijd</dc:creator>
      <dc:date>2017-06-29T12:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Stack placed in RAM2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678680#M27278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reaction,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you can explain me something.&lt;/P&gt;&lt;P&gt;when i execute this code:&lt;/P&gt;&lt;P&gt;uint8_t test;&lt;/P&gt;&lt;P&gt;printf("test addr %x\r\n",&amp;amp;test);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my debug output says:&lt;BR /&gt;test addr 20083fe7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my thought was that [test] is placed on the stack and with asking the adders of [test] i can figure out where the stack is placed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my current problem is that the initialization of local variable goes wrong.&lt;/P&gt;&lt;P&gt;void SCR_idle(void){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Point_t point1 = {.x=120,.y=30};&amp;nbsp;&lt;/P&gt;&lt;P&gt;..etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after executing&amp;nbsp;&lt;SPAN&gt;Point_t point1 = {.x=120,.y=30}; &amp;nbsp;the value of point.x ==0 and&amp;nbsp;point.y == 0.&lt;BR /&gt;when i was searching for the problem i found out with printing the location of the variables that its on a different&amp;nbsp;location.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I though&amp;nbsp;that my&amp;nbsp;&amp;nbsp;memory was build up like:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;On-chip SRAM-bottom:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;-vtable&lt;BR /&gt;-bss&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;-data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;-heap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;On-chip SRAM-top:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;-stack&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;RAM2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;-bss (large buffers defined by &amp;nbsp; __BSS(RAM2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;whats wrong with my&amp;nbsp;interpretation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; font-size: 14px;"&gt;thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 07:49:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678680#M27278</guid>
      <dc:creator>markvanderheijd</dc:creator>
      <dc:date>2017-06-30T07:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stack placed in RAM2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678681#M27279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="296469" data-username="markvanderheijden" href="https://community.nxp.com/people/markvanderheijden"&gt;mark van der Heijden,&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for your reply and I'd like to confirm something wih you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Whether test is the global value.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 09:28:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678681#M27279</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-30T09:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stack placed in RAM2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678682#M27280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremyzhou,&lt;/P&gt;&lt;P&gt;Thank you for your reaction.&lt;/P&gt;&lt;P&gt;The variables are local variables.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I moved more buffers to RAM2 and now my code seems to work. But i still don't understand whats happening.&lt;BR /&gt;two things are unclear for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. my previous question : wy the &amp;nbsp;function :&lt;BR /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;void SCR_idle(void){&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Point_t point1 = {.x=120,.y=30};&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf("debug addr: %x", &amp;amp;&lt;SPAN&gt;point1 &lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;printout a location in the RAM2 segment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.in my startup file i write my whole memory(&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;On-chip SRAM&lt;/SPAN&gt;) with a pattern&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unsigned int addr;&lt;BR /&gt; for(addr = 0x10000000; addr &amp;lt; 0x10007DFF; addr++){&lt;BR /&gt; if(addr %2){&lt;BR /&gt; *(unsigned int *)addr = 0xde;&lt;BR /&gt; }else{&lt;BR /&gt; *(unsigned int *)addr = 0xad;&lt;BR /&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the failing initialization of a local variable i checked my memory and i see a lot of DEADDE still in my memory.&amp;nbsp;Wat can be the reason that the initialization is failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;thank you in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 11:18:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678682#M27280</guid>
      <dc:creator>markvanderheijd</dc:creator>
      <dc:date>2017-06-30T11:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Stack placed in RAM2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678683#M27281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="296469" data-username="markvanderheijden" href="https://community.nxp.com/people/markvanderheijden"&gt;mark van der Heijden&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;The question seems a bit interesting, and I will appreciate if you share the completely testing code.&lt;/P&gt;&lt;P&gt;I'm looking forward to your reply.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 09:23:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Stack-placed-in-RAM2/m-p/678683#M27281</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-07-03T09:23:27Z</dc:date>
    </item>
  </channel>
</rss>

