<?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>Kinetis Microcontrollers中的主题 Re: K82 : MCUExpresso disable heap usage</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839169#M50671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have MPU enabled environment&amp;nbsp; and any extra memory accesses to unknown area cause faults.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linker file I set nohost version already&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Redlib Nohost */&lt;BR /&gt;GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a)&lt;/P&gt;&lt;P&gt;And in project settings it show nohost-nf like you recommend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;printf() is not used for sure but&amp;nbsp;snprintf() is used for cook formatted strings.&lt;/P&gt;&lt;P&gt;Also FreeRTOS in some debug places use&amp;nbsp;sprintf() functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have idea why is latest&amp;nbsp;MCUXpressoIDE_10.3.0_2200 is so slow in case of compilation ?&lt;/P&gt;&lt;P&gt;Previos version is fly on my computer, but current one need 5 min for compile project, even before it was 1 min.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2018 08:42:15 GMT</pubDate>
    <dc:creator>EugeneHiihtaja</dc:creator>
    <dc:date>2018-12-28T08:42:15Z</dc:date>
    <item>
      <title>K82 : MCUExpresso disable heap usage</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839167#M50669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use latest MCU Expresso and SDK for develop firmware for K82.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How-to completely disable heap usage and be sure if malloc/free is not called suddenly somewhere ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set HeapSize =0 in Linker file and set trap for malloc/free in linker options.&lt;/P&gt;&lt;P&gt;But looks like heap is used somewhere in any case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Xlinker --wrap=malloc&amp;nbsp;-Xlinker --wrap=free&amp;nbsp;-Xlinker --wrap=calloc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But linker report :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c:/nxp/mcuxpressoide_10.3.0_2200/ide/plugins/com.nxp.mcuxpresso.tools.win32_10.3.0.201811011841/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libcr_c.a(fpprintf.o): In function `printf':&lt;BR /&gt;fpprintf.c:(.text.printf+0x1e): undefined reference to `__wrap_malloc'&lt;BR /&gt;fpprintf.c:(.text.printf+0x3e): undefined reference to `__wrap_free'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;c:/nxp/mcuxpressoide_10.3.0_2200/ide/plugins/com.nxp.mcuxpresso.tools.win32_10.3.0.201811011841/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libcr_c.a(fclose.o): In function `fclose':&lt;BR /&gt;fclose.c:(.text.fclose+0x24): undefined reference to `__wrap_free'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How-to disable heap in MCUExpresso and K82 in correct way ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 07:27:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839167#M50669</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2018-12-28T07:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : MCUExpresso disable heap usage</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839168#M50670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have much control what the GNU library does: internally it can use malloc() for things like printf() or file I/O. Another reason not to use the prinf() of the library. But what you can do is to disable at least some of it with selecting a 'none' or no-host' library variant:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/71201i64EAEEB6F0101A98/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The other way is that you overwrite the malloc() and free() functions with your own version to trap all usage of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 07:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839168#M50670</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-12-28T07:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : MCUExpresso disable heap usage</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839169#M50671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have MPU enabled environment&amp;nbsp; and any extra memory accesses to unknown area cause faults.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linker file I set nohost version already&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Redlib Nohost */&lt;BR /&gt;GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a)&lt;/P&gt;&lt;P&gt;And in project settings it show nohost-nf like you recommend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;printf() is not used for sure but&amp;nbsp;snprintf() is used for cook formatted strings.&lt;/P&gt;&lt;P&gt;Also FreeRTOS in some debug places use&amp;nbsp;sprintf() functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have idea why is latest&amp;nbsp;MCUXpressoIDE_10.3.0_2200 is so slow in case of compilation ?&lt;/P&gt;&lt;P&gt;Previos version is fly on my computer, but current one need 5 min for compile project, even before it was 1 min.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 08:42:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839169#M50671</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2018-12-28T08:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : MCUExpresso disable heap usage</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839170#M50672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more experiment. I have taken printf-stdarg.c implementation from Freertos examples and references to malloc/calloc are vanish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But free is still in use somewhere&amp;nbsp;c:/nxp/mcuxpressoide_10.3.0_2200/ide/plugins/com.nxp.mcuxpresso.tools.win32_10.3.0.201811011841/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libcr_c.a(fclose.o): In function `fclose':&lt;BR /&gt;fclose.c:(.text.fclose+0x24): undefined reference to `__wrap_free'&lt;BR /&gt;collect2.exe: error: ld returned 1 exit status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fclose() is actively used in mbedTLS&amp;nbsp; common code but for K82 it is excluded in configuration by using #ifdef flags.&lt;/P&gt;&lt;P&gt;May be linker is not willing so strip it or this call exists in other call function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At list active code dosn't have reference to it.&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 09:40:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839170#M50672</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2018-12-28T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: K82 : MCUExpresso disable heap usage</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839171#M50673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Having directories in the path that do not exist can slow GCC to a crawl at times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;printf() and&amp;nbsp; snprintf() will likely call the same underlying print library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Random tip that came to mind when reading your message, make sure all the stack are always aligned to an eight byte (long long) boundary when initialized.&amp;nbsp; Generally this happens by default by pointing at the end of RAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 19:42:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-MCUExpresso-disable-heap-usage/m-p/839171#M50673</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2018-12-28T19:42:53Z</dc:date>
    </item>
  </channel>
</rss>

