<?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>8-bit MicrocontrollersのトピックRe: Debugging COP resets... S08</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124375#M278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm. WHAT trace buffers? I guess a full-scale ICE might&lt;BR /&gt;have a significant trace history, but I'm using the internal BDC;&lt;BR /&gt;&lt;BR /&gt;In any case, the problem is detecting that a reset has occured.&lt;BR /&gt;It seems that usinga debugger based on BDC/DBG, an internally generated&lt;BR /&gt;reset like COP reset will reset the internal registers that would normally&lt;BR /&gt;let the debugger software know that anything had happened. So I can be&lt;BR /&gt;sitting in the debugger happily thinking I have three hardware breakpoints&lt;BR /&gt;set (one in BDC, two in DBG?), while a COP reset might have caused them&lt;BR /&gt;to be removed entirely...&lt;BR /&gt;&lt;BR /&gt;(Of course, you an just disable COP reset when debugging, or you can&lt;BR /&gt;manually put BKGD (breakpoint) instructions in your init code, but I&lt;BR /&gt;was hoping for something more elegant?)&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Feb 2007 01:04:19 GMT</pubDate>
    <dc:creator>billw</dc:creator>
    <dc:date>2007-02-27T01:04:19Z</dc:date>
    <item>
      <title>Debugging COP resets...</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124373#M276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was having a tough time debugging some COP reset issues using the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;black widow virtual lab, and I think I finally figured out that this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;was because a COP reset resets the Background Debug System as well as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the rest of the CPU. Since things like breakpoints are done via&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;registers in the BDC, they all disappear when a COP (or other) reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;occurs. So all the careful breakpoints I put in early init code trying&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to catch a reset occuring got essentially deleted by the reset. Sigh.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how do you debug COP reset issues? Can the BDC be configured to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;trap resets automatically (I skimmed that section of the manual and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;didn't see anything)? Can I force the debugger to insert "hard" code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;style breakpoints (that survive a cpu reset) instead of using the BDC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;hardware breakpoints or trap resets that happpen during debugging?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(some of my pain was from expecting patched-code style breakpoints,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which I'm used to on large CPUs...) The DBG module has the same&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;problems as the BDC, doesn't it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BillW&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 17:27:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124373#M276</guid>
      <dc:creator>billw</dc:creator>
      <dc:date>2007-02-26T17:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging COP resets... S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124374#M277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Bill,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There is nothing stopping a Reset.&lt;/DIV&gt;&lt;DIV&gt;But I believed the debug buffers were not flushed.&lt;/DIV&gt;&lt;DIV&gt;Therefore you can see what happened before your reset with the trace buffers.&lt;/DIV&gt;&lt;DIV&gt;Am I wrong ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2007 17:48:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124374#M277</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-26T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging COP resets... S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124375#M278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm. WHAT trace buffers? I guess a full-scale ICE might&lt;BR /&gt;have a significant trace history, but I'm using the internal BDC;&lt;BR /&gt;&lt;BR /&gt;In any case, the problem is detecting that a reset has occured.&lt;BR /&gt;It seems that usinga debugger based on BDC/DBG, an internally generated&lt;BR /&gt;reset like COP reset will reset the internal registers that would normally&lt;BR /&gt;let the debugger software know that anything had happened. So I can be&lt;BR /&gt;sitting in the debugger happily thinking I have three hardware breakpoints&lt;BR /&gt;set (one in BDC, two in DBG?), while a COP reset might have caused them&lt;BR /&gt;to be removed entirely...&lt;BR /&gt;&lt;BR /&gt;(Of course, you an just disable COP reset when debugging, or you can&lt;BR /&gt;manually put BKGD (breakpoint) instructions in your init code, but I&lt;BR /&gt;was hoping for something more elegant?)&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2007 01:04:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124375#M278</guid>
      <dc:creator>billw</dc:creator>
      <dc:date>2007-02-27T01:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging COP resets... S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124376#M279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm. So I inserted a BGND instruction into the BW contest program&lt;BR /&gt;near main() so make sure the debugger notices resets. When&lt;BR /&gt;the program first runs, it hits the BGND and the debugger reports&lt;BR /&gt;an "illegal breakpoint", which is about what I'd expect to happen&lt;BR /&gt;when the BDC gets invoked at a spot it doesn't think it set a breakpoint&lt;BR /&gt;at. So I continue from there ("go"), and arrange for there to be a&lt;BR /&gt;COP timeout reset. At this point the debugger reports something&lt;BR /&gt;strange along the lines of hitting a multiple condition trace event&lt;BR /&gt;(BEFORE it gets to the BGND instruction.) In theory, this is great!&lt;BR /&gt;The debugger has somehow trapped the reset? But apparently not, since&lt;BR /&gt;the next thing that happens is that it reports that it has lost contact&lt;BR /&gt;with the target and needs to reconnect! What's going on?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 01:56:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugging-COP-resets/m-p/124376#M279</guid>
      <dc:creator>billw</dc:creator>
      <dc:date>2007-03-01T01:56:30Z</dc:date>
    </item>
  </channel>
</rss>

