<?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のトピックhazardous behaviour with HCS12 MC9S12GC64</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139334#M2284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm getting crazy with debugging a very "simple" application: reading 5 sensors and controling max 4 outputs and a display with icons :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a bootloader to load my application&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- with a "empty" periodic loop (every 30s), no problem since application do nearly nothing it's difficult to see if there's a trouble&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- when i add: acquisition routines , tests routines to see if the inputs are in correct range , simple control routine which activate an output if inputs are in incorrect range&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;, the application become to do hazardous things: global variables that are not accessed for write (just read) by the current loop are modified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Inside the loop, i use mostly byte variable, accessing with bit mask for reading and sometimes for writing, but only global varaible from the "applicative" file (not the "kernel")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I attached the applicative file, the main fonction with the loop is the "CESI" fonction, called by the kernel after boot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope somebody can help me&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Dec 2006 00:39:15 GMT</pubDate>
    <dc:creator>davidCH</dc:creator>
    <dc:date>2006-12-08T00:39:15Z</dc:date>
    <item>
      <title>hazardous behaviour with HCS12 MC9S12GC64</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139334#M2284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm getting crazy with debugging a very "simple" application: reading 5 sensors and controling max 4 outputs and a display with icons :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a bootloader to load my application&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- with a "empty" periodic loop (every 30s), no problem since application do nearly nothing it's difficult to see if there's a trouble&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- when i add: acquisition routines , tests routines to see if the inputs are in correct range , simple control routine which activate an output if inputs are in incorrect range&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;, the application become to do hazardous things: global variables that are not accessed for write (just read) by the current loop are modified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Inside the loop, i use mostly byte variable, accessing with bit mask for reading and sometimes for writing, but only global varaible from the "applicative" file (not the "kernel")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I attached the applicative file, the main fonction with the loop is the "CESI" fonction, called by the kernel after boot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope somebody can help me&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 00:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139334#M2284</guid>
      <dc:creator>davidCH</dc:creator>
      <dc:date>2006-12-08T00:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: hazardous behaviour with HCS12 MC9S12GC64</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139335#M2285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;This&lt;BR /&gt;&amp;gt;global variables that are not accessed&lt;BR /&gt;&amp;gt;for write (just read) by the current loop&lt;BR /&gt;&amp;gt;are modified.&lt;BR /&gt;&lt;BR /&gt;sounds like a stack overwrite problem. How large is your stack (STACKSIZE in the prm file)? Does it help if you increase it.&lt;BR /&gt;Did you try to set a watchpoint to the changing globals?&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 05:39:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139335#M2285</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-12-08T05:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: hazardous behaviour with HCS12 MC9S12GC64</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139336#M2286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Or simply download the whole program to the debugger. Before you start the CPU, set all cells in the stack memory to zero. Let the program run for a while and then check how much of the stack it has munched away at.&lt;BR /&gt;&lt;BR /&gt;And if you expect others here to read through your code, please write it in english.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Dec 2006 20:44:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/hazardous-behaviour-with-HCS12-MC9S12GC64/m-p/139336#M2286</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2006-12-08T20:44:07Z</dc:date>
    </item>
  </channel>
</rss>

