<?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>i.MX RT Crossover MCUs中的主题 Re: Malloc failed in RT1060-EVK project CSI_RGB565</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819251#M1285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Hi, Carlos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I solved this problem by using simple heap management replace malloc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jan 2019 07:12:21 GMT</pubDate>
    <dc:creator>vvzhong</dc:creator>
    <dc:date>2019-01-11T07:12:21Z</dc:date>
    <item>
      <title>Malloc failed in RT1060-EVK project CSI_RGB565</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819249#M1283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are evaluate RT1060 performance with RT1060 evk.&lt;/P&gt;&lt;P&gt;The first step we have to do now is to use the OV7725 and caputre the YUV422 data.Then extract the Y data to the buff. So will use malloc to apply for a buffer, and the buffer address should be in 0x8000xxxx。&lt;/P&gt;&lt;P&gt;There is no problem when using malloc(100), but malloc(480*272) will fail.&amp;nbsp;With print, malloc(480*272) return 0, but malloc(100) will return 0x80000300. Our project base on the example CSI_RGB565 build with IAR ,and configuration is sdram_debug. Evk board have 256Mbit SDRAM, what cause this issuse happend?&lt;/P&gt;&lt;P&gt;Did I not open SDRAM in the code?&lt;/P&gt;&lt;P&gt;In fsl_commom.c, there is SDK_Malloc but the same result. Do I create memory management myself?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;uint8_t *recontent =(uint8_t*)malloc(100);&lt;/DIV&gt;&lt;DIV&gt;uint8_t *src = (uint8_t*)malloc(480*272);&lt;/DIV&gt;&lt;DIV&gt;printf("recontent 0x%x\r\n",recontent);&lt;/DIV&gt;&lt;DIV&gt;printf("src 0x%x\r\n",src);&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73917iBFD61BE97C80356F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 09:41:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819249#M1283</guid>
      <dc:creator>vvzhong</dc:creator>
      <dc:date>2018-11-09T09:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc failed in RT1060-EVK project CSI_RGB565</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819250#M1284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In case of the malloc function, it is usually not recommended in embedded systems, because it uses the default RAM memory, which is limited and may cause issues with the Heap/Stack.&lt;/P&gt;&lt;P&gt;In case of the i.MX RT, when creating MCUXpresso projects for EVKB-MIMXRT1050 board, it usually includes 4 RAM sections: SRAM_DTC (128KB), SRAM_ITC (128KB), SRAM_OC (256KB) and BOARD_SDRAM (32MB).&lt;/P&gt;&lt;P&gt;You could change which segment is the default one on the Project properties -&amp;gt; C/C++ Build -&amp;gt; MCU Settings.&lt;/P&gt;&lt;P&gt;You could also define variables inside specific memory segments. For this approach, you could refer to the following links:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/321587"&gt;Controlling data and function placement in memory&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;Defining Variables at Absolute Addresses with gcc | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this will be useful for you.&lt;BR /&gt;Best regards!&lt;BR /&gt;/Carlos&lt;BR /&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>Tue, 13 Nov 2018 20:32:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819250#M1284</guid>
      <dc:creator>CarlosCasillas</dc:creator>
      <dc:date>2018-11-13T20:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Malloc failed in RT1060-EVK project CSI_RGB565</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819251#M1285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Hi, Carlos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;I solved this problem by using simple heap management replace malloc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Best regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2019 07:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Malloc-failed-in-RT1060-EVK-project-CSI-RGB565/m-p/819251#M1285</guid>
      <dc:creator>vvzhong</dc:creator>
      <dc:date>2019-01-11T07:12:21Z</dc:date>
    </item>
  </channel>
</rss>

