<?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>LPCXpresso IDEのトピックRe: __DATA Section Problem</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555619#M13775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nkarakotas on Sat Mar 03 10:57:25 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the info. I was having major problem with the heap and apparently&amp;nbsp; heap fragmentation problems. I changed the LWIP ram to .bss RAM2 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;__BSS(RAM2)&amp;nbsp; u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The heap showed that it was available but when I run a HTTP request it produced problems as it could not allocate the required size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It now works better by having the lwip stack on the RAM2 location. I allocate memory dynamically when im loading files from sdcard to linked lists to parse json objects and then load it to a SYSTEM object around 2K.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will upload the details you requested tomorrow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NIck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:08:27 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:08:27Z</dc:date>
    <item>
      <title>__DATA Section Problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555617#M13773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nkarakotas on Sat Mar 03 08:19:50 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Whenever I try to use the __DATA macro the system crashes. The value in debug is updated I cant understand what is going? I would like to add the ram_heap of LWIP on RAM2 as .data to separate them and know how much heap I have got. Only __BSS works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__DATA(RAM2) char data_buffer[1024] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int main( void )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sys_sem_t lock;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;data_buffer[0] = 'P';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data_buffer[1] = '\n';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data_buffer[2] = '\0';&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%s",data_buffer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:08:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555617#M13773</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: __DATA Section Problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555618#M13774</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 Sat Mar 03 10:05:55 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Fundamentally, trying to place a BSS (zero initialised) variable into data doesn't make a whole lot of sense, as this will cause you to end up with a whole lot of zeroes stored in your flash. Whereas if you place the variable into bss, then the zeroes will be dynamically set up by the startup code - and won't consume space in flash. Thus using the __BSS macro here would certainly be the sensible thing to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As to why you are getting a crash when you use __DATA macro, it is hard to say what might be happening here without more information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) What are the details of your actual crash?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Which MCU are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Are you using the managed linker script mechanism, or supplying your own linker script? If you are using your own, then please post it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Can you provide the map file generated by the linker? [Suggest posting the file as a zipped attachment].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) If possible please post an actual build able project. For details of how to export your project from LPCXpresso IDE, please see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/ImportExport&lt;/A&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>Thu, 16 Jun 2016 02:08:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555618#M13774</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: __DATA Section Problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555619#M13775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nkarakotas on Sat Mar 03 10:57:25 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the info. I was having major problem with the heap and apparently&amp;nbsp; heap fragmentation problems. I changed the LWIP ram to .bss RAM2 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;__BSS(RAM2)&amp;nbsp; u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The heap showed that it was available but when I run a HTTP request it produced problems as it could not allocate the required size.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It now works better by having the lwip stack on the RAM2 location. I allocate memory dynamically when im loading files from sdcard to linked lists to parse json objects and then load it to a SYSTEM object around 2K.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will upload the details you requested tomorrow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NIck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:08:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/DATA-Section-Problem/m-p/555619#M13775</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:08:27Z</dc:date>
    </item>
  </channel>
</rss>

