<?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>CodeWarrior for MCUのトピックTrue-time Simulator &amp; Real-time Debugger</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/True-time-Simulator-Real-time-Debugger/m-p/208611#M8137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this with P&amp;amp;E multilink, and MC9S08JM32 controller.&lt;/P&gt;&lt;P&gt;How can I watch a variable in real time?&lt;/P&gt;&lt;P&gt;eg. I have a function xyz() in source file abc.c, and I want to watch how a variable volatile Bool myVar changes in real time.&lt;/P&gt;&lt;P&gt;I used the debugger Component -&amp;gt; Open -&amp;gt; Data but only the global variables are viewable. I do not know how to view the local variables within each function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2011 11:54:57 GMT</pubDate>
    <dc:creator>leesp</dc:creator>
    <dc:date>2011-05-24T11:54:57Z</dc:date>
    <item>
      <title>True-time Simulator &amp; Real-time Debugger</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/True-time-Simulator-Real-time-Debugger/m-p/208611#M8137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this with P&amp;amp;E multilink, and MC9S08JM32 controller.&lt;/P&gt;&lt;P&gt;How can I watch a variable in real time?&lt;/P&gt;&lt;P&gt;eg. I have a function xyz() in source file abc.c, and I want to watch how a variable volatile Bool myVar changes in real time.&lt;/P&gt;&lt;P&gt;I used the debugger Component -&amp;gt; Open -&amp;gt; Data but only the global variables are viewable. I do not know how to view the local variables within each function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 11:54:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/True-time-Simulator-Real-time-Debugger/m-p/208611#M8137</guid>
      <dc:creator>leesp</dc:creator>
      <dc:date>2011-05-24T11:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: True-time Simulator &amp; Real-time Debugger</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/True-time-Simulator-Real-time-Debugger/m-p/208612#M8138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the debugger can read from the memory while the target is running (using BDM background cycles). This works only for memory (with an address), but not for CPU core registers.&lt;/P&gt;&lt;P&gt;So with global memory you are ok.&lt;/P&gt;&lt;P&gt;But local variables are on the stack, and the address of it is not always the same. Even more: the scope of the function might not be 'alive', so the debugger cannot read that variable, so this won't work for local variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you can do is: make the variable a 'static local':&lt;/P&gt;&lt;P&gt;void foo(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; static int myStaticLocal;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;and that way it will be in global memory, so you can watch it (but: it won't bee reentrant).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you think your variable is always at a certain address on the stack (what usually is not the case), then you simply could watch that address on the stack too (e.g. in the memory view).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 13:07:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/True-time-Simulator-Real-time-Debugger/m-p/208612#M8138</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2011-05-24T13:07:07Z</dc:date>
    </item>
  </channel>
</rss>

