<?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: assert() in SDK in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882648#M1406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's also a bad practice to use the assert provided by the libc used (*if* it is used one).&lt;/P&gt;&lt;P&gt;For example newlib provided assert calls printf(), that in turns calls malloc that it is a big problem. In the specific case we do not have heap for the &lt;EM&gt;malloc&lt;/EM&gt; provided by newlib-nano (we use the allocator 4 provided by FreeRTOS). The malloc is very slow and indeterministic about the timing, and also is not thread safe and we should allocate a &lt;EM&gt;_reent&lt;/EM&gt; structure of about 2KB for each task, because it is too much memory consuming. It's also very slow.&lt;/P&gt;&lt;P&gt;In general, I don't think it's a good practice that the HAL driver library (the fsl_*.[ch] files) relies on the library API (see the include list at the top of the fsl_common.h file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Sep 2019 16:27:11 GMT</pubDate>
    <dc:creator>mastupristi</dc:creator>
    <dc:date>2019-09-26T16:27:11Z</dc:date>
    <item>
      <title>assert() in SDK</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882646#M1404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the i.MX RT105x processor I downloaded the SDKs both in version 2.4.2 and 2.5.0.&lt;BR /&gt;In the driver sources (the fsl_* files) the assert() function is used in many points of the code.&lt;BR /&gt;I would like to use my own version of the assert() and not the one provided by the standard c library (either newlib nano, or redlib).&lt;BR /&gt;What is the correct way to do this?&lt;/P&gt;&lt;P&gt;I don't know if we should edit the fsl_* files. However, I have seen that the file fsl_common.h includes the standard header assert.h.&lt;/P&gt;&lt;P&gt;How "bad practice" is to edit this file to replace the inclusion of assert.h with my own file where I then redefine the assert function in the most convenient way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2019 17:10:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882646#M1404</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2019-02-04T17:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: assert() in SDK</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882647#M1405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimiliano Cialdi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned, it is not the optimal practice to replace the assert.h from a common file, but if you consider necessary to use your own driver, then yes, you can use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jorge Alcala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 22:59:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882647#M1405</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-02-11T22:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: assert() in SDK</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882648#M1406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's also a bad practice to use the assert provided by the libc used (*if* it is used one).&lt;/P&gt;&lt;P&gt;For example newlib provided assert calls printf(), that in turns calls malloc that it is a big problem. In the specific case we do not have heap for the &lt;EM&gt;malloc&lt;/EM&gt; provided by newlib-nano (we use the allocator 4 provided by FreeRTOS). The malloc is very slow and indeterministic about the timing, and also is not thread safe and we should allocate a &lt;EM&gt;_reent&lt;/EM&gt; structure of about 2KB for each task, because it is too much memory consuming. It's also very slow.&lt;/P&gt;&lt;P&gt;In general, I don't think it's a good practice that the HAL driver library (the fsl_*.[ch] files) relies on the library API (see the include list at the top of the fsl_common.h file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2019 16:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/assert-in-SDK/m-p/882648#M1406</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2019-09-26T16:27:11Z</dc:date>
    </item>
  </channel>
</rss>

