<?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>MQX Software SolutionsのトピックRe: Re: Debug of program exit</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350830#M11349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; Just FYI, '0' seems to work too.&amp;nbsp; Guess you COULD look at this value to take some action in the debugger.&lt;/P&gt;&lt;P&gt;Too bad about the behavior--guess that means can't leave bkpt instructions sprinkled in the code!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 19:32:22 GMT</pubDate>
    <dc:creator>jvasil</dc:creator>
    <dc:date>2015-02-09T19:32:22Z</dc:date>
    <item>
      <title>Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350824#M11343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my world I don't use exit() at all, but sometimes a nasty error could happen inside a library func&lt;/P&gt;&lt;P&gt;which calls exit(). In the comp.c this function is implemented as this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void _exit(int status)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;// disable all interrupts, run infinite loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm("cpsid i");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be much nicer is if the sw could just enter the debugger. Do I have to patch the source, or is there a&lt;/P&gt;&lt;P&gt;non intrusive way of do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 14:47:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350824#M11343</guid>
      <dc:creator>oaf</dc:creator>
      <dc:date>2015-01-16T14:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350825#M11344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello,&lt;/P&gt;&lt;P&gt;I have checked the source code file and it is located in KSDK_1.1.0\rtos\mqx\mqx\source\psp\cortex_m\compiler\gcc_arm\comp.c, i.e. this program module is a part of MQX. It is a static source code file and you can modify it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;This issue is related to MQX software solution. I will move it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Marek Neuzil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 08:54:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350825#M11344</guid>
      <dc:creator>marek_neuzil</dc:creator>
      <dc:date>2015-02-06T08:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350826#M11345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;If I may wish a solution with a function-pointer, weak-link would be better, as you then doesn't have to change the library source.&lt;/P&gt;&lt;P&gt;BTW:what is the assembly instruction for breakpoint?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 07:56:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350826#M11345</guid>
      <dc:creator>oaf</dc:creator>
      <dc:date>2015-02-09T07:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350827#M11346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14234970400667181" jivemacro_uid="_14234970400667181"&gt;
&lt;/PRE&gt;&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&amp;nbsp; __asm("bkpt 4");&lt;/TD&gt;
&lt;TD&gt;&lt;/TD&gt;
&lt;TD&gt;//DES example of using assembly code in "C" source to halt/break in the code.&amp;nbsp; A debugger can then step over and the resume execution.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 15:51:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350827#M11346</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-02-09T15:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350828#M11347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In some example code, I've seen this coded with a '0' instead of a '4'.&amp;nbsp; ARM documentation says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The &lt;CODE class="code"&gt;BKPT&lt;/CODE&gt; instruction causes the processor to enter Debug state. Debug tools can use this to investigate system state when the instruction at a particular address is reached.&lt;/P&gt;&lt;P&gt;In both ARM state and Thumb state, &lt;CODE class="literal"&gt;&lt;EM class="replaceable"&gt;&lt;CODE&gt;imm&lt;/CODE&gt;&lt;/EM&gt;&lt;/CODE&gt; is ignored by the ARM hardware. However, a debugger can use it to store additional information about the breakpoint." [&lt;A href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/Cihbiggi.html" title="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/Cihbiggi.html"&gt;ARM Information Center&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm curious if there is any particular reason for using '4'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also curious about what happens if a bkpt instruction is executed when there is no debugger connected.&amp;nbsp; I assume this acts similar to either a NOP or a HALT but haven't found a description of this yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 19:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350828#M11347</guid>
      <dc:creator>jvasil</dc:creator>
      <dc:date>2015-02-09T19:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350829#M11348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;No particular reason for "4" other than it works.&lt;/P&gt;&lt;P&gt;My testing without debugger has behavior of a HALT.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 19:18:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350829#M11348</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-02-09T19:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Debug of program exit</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350830#M11349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; Just FYI, '0' seems to work too.&amp;nbsp; Guess you COULD look at this value to take some action in the debugger.&lt;/P&gt;&lt;P&gt;Too bad about the behavior--guess that means can't leave bkpt instructions sprinkled in the code!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 19:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debug-of-program-exit/m-p/350830#M11349</guid>
      <dc:creator>jvasil</dc:creator>
      <dc:date>2015-02-09T19:32:22Z</dc:date>
    </item>
  </channel>
</rss>

