<?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: printf causing hard fault in NewLibNano(semihost)</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020947#M39892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="318024" data-username="leo838" href="https://community.nxp.com/people/leo838"&gt;leo838&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have exact LPC812 board in my hand, so I tested it with LPCXpresso824 demo board.&lt;/P&gt;&lt;P&gt;If you want to print to uart, I suggest you use Newlibano nohost. although I tested semihost lib also working, but using Newlibano nohost is my recommendation.&lt;/P&gt;&lt;P&gt;Please see my attached video, there is no hardfault while running the program. I suggest you follow the steps and test yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Jun Zhang&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Dec 2019 02:52:57 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2019-12-13T02:52:57Z</dc:date>
    <item>
      <title>printf causing hard fault in NewLibNano(semihost)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020946#M39891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently tried running demo programs (provided in an LPC812 SDK) in debug mode on a LPC812 Xpresso board (eg. lpcxpresso812max_sctimer_16bit_counter ) &amp;amp; because of memory space constraints was forced to compile it with the Newlibano(semihost) library. This resulted during running in a hard fault (redirection to&amp;nbsp; function void HardFault_Handler(void)). Once the printf's were committed out the program executed normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I doing something wrong? From what I've read printf's should be supported in this library./ environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:20:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020946#M39891</guid>
      <dc:creator>leo838</dc:creator>
      <dc:date>2019-12-08T20:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: printf causing hard fault in NewLibNano(semihost)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020947#M39892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="318024" data-username="leo838" href="https://community.nxp.com/people/leo838"&gt;leo838&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have exact LPC812 board in my hand, so I tested it with LPCXpresso824 demo board.&lt;/P&gt;&lt;P&gt;If you want to print to uart, I suggest you use Newlibano nohost. although I tested semihost lib also working, but using Newlibano nohost is my recommendation.&lt;/P&gt;&lt;P&gt;Please see my attached video, there is no hardfault while running the program. I suggest you follow the steps and test yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Jun Zhang&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 02:52:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020947#M39892</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2019-12-13T02:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: printf causing hard fault in NewLibNano(semihost)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020948#M39893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was under the impression that a semihost library was required to enable printf messages to be sent to the debug console. I tried your solution but unfortunately the same result. I then tried using the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quick setting&amp;gt; SDK debug console&amp;gt; semihost console&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; together with the nohost library it solved the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems, at least in my environment, that these settings are &lt;SPAN style="text-decoration: underline;"&gt;not &lt;/SPAN&gt;retained during builds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Dec 2019 20:04:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/printf-causing-hard-fault-in-NewLibNano-semihost/m-p/1020948#M39893</guid>
      <dc:creator>leo838</dc:creator>
      <dc:date>2019-12-14T20:04:08Z</dc:date>
    </item>
  </channel>
</rss>

