<?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>topic Re: S12XE programming and debugging issue in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212846#M8883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that with no success.&lt;/P&gt;&lt;P&gt;Here's part of HiWave's command window content just when preload command file is to be executed:&lt;/P&gt;&lt;PRE&gt;FP: FLASH parameters loaded for MC9S12XEG128_V2(NVMIF2 rev 1,1,1,1,1) from D:\Programy\Freescale\CWS12v5.1\prog\FPP\mcu02DD.fppexecuting cmd\P&amp;amp;E_Multilink_USB_Preload.cmd!// Before load the commands written below will be executed!FLASH NOUNSECUREdone cmd\P&amp;amp;E_Multilink_USB_Preload.cmdPreload command file correctly executed.USB HCS08/HCS12 MULTILINK detected - Flash Version 5.84executing cmd\P&amp;amp;E_Multilink_USB_Reset.cmd!// After reset the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Reset.cmdReset command file correctly executed.      MCU clock speed: 2012000 HzBlock Module Name      Address Range   Status   0  PFLASH            4000 -  7FFF   Blank - Unselected   1  PFLASH            C000 -  FFFF   Blank - Unselected   2  PFLASH          E08000 -E3BFFF   Blank - Unselected   3  PFLASH          FC8000 -FFBFFF   Blank - Unselected   4  DFLASH             800 -1F0BFF   Blank - UnselectedFP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the DFLASH flash module =&amp;gt; Skipped.executing cmd\P&amp;amp;E_Multilink_USB_Vppon.cmd!// Before programming the flash, the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Vppon.cmdVppon command file correctly executed.FP: Arm FLASH for loading.executing cmd\P&amp;amp;E_Multilink_USB_Vppon.cmd!// Before programming the flash, the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Vppon.cmdVppon command file correctly executed.executing D:\Repozytoria\Code\Proj...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Then it continues with the rest of command files ending with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;executing cmd\P&amp;amp;E_Multilink_USB_Postload.cmd!// After load the commands written below will be executed done cmd\P&amp;amp;E_Multilink_USB_Postload.cmdPostload command file correctly executed.                                                                                                                      ^Error: Loading failed!&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Again, no problems when using code with no usage of SEC bits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Mar 2012 22:49:30 GMT</pubDate>
    <dc:creator>mroczeks</dc:creator>
    <dc:date>2012-03-06T22:49:30Z</dc:date>
    <item>
      <title>S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212842#M8879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having troubles programming and debugging my S12XE based devices with CodeWarrior + ProcessorExpert + HiWave + P&amp;amp;E Micro USB BDM MultiLink debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run debugging from CodeWarrior (Debug "play" alike icon button), HiWave launches and loading of executable file (abs) begins (see menu dialog "s12 executable loading configuration.png").&lt;/P&gt;&lt;P&gt;At verification stage error window appears (see "s12 programming issue 2.png").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to debug my code because of that. The address 0x0000C000 is where my code is placed (logical 0xC000).&lt;/P&gt;&lt;P&gt;I searched through my code repository revisions and I found that the problem appeared after setting Flash Module Security Bits to Unsecured State. I set this under ProcessorExpert while working on some flash related stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in my CPU bean the FLASH Security state option is set to Disabled now. Before it was set to Not initialized and then programming and debugging worked fine.&lt;/P&gt;&lt;P&gt;I checked that again and it works when not initialized, and does not work when set to Disabled.&lt;/P&gt;&lt;P&gt;I looked at code differences between those two settings.&lt;/P&gt;&lt;P&gt;When FLASH Security state option is set to Disabled, security bits SEC[1:0] are set to 10 meaning unsecured state (see Reference Manual, chapter 9.1.3).&lt;/P&gt;&lt;P&gt;When FLASH Security state option is set to Not initialized, security bits SEC[1:0] are NOT SET in code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this is not ProcessorExpert issue, code generated seems to be OK with Reference Manual.&lt;/P&gt;&lt;P&gt;It's rather something else. Maybe I am missing something...&lt;/P&gt;&lt;P&gt;I couldn't find any info why setting security to unsecure state makes programming and debugging via HiWave + P&amp;amp;E Micro USB Multilink impossible...&lt;/P&gt;&lt;P&gt;Anyone anything?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 23:33:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212842#M8879</guid>
      <dc:creator>mroczeks</dc:creator>
      <dc:date>2012-03-05T23:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212843#M8880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/60993#60993" title="https://community.freescale.com/message/60993#60993"&gt;https://community.freescale.com/message/60993#60993&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 01:23:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212843#M8880</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-03-06T01:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212844#M8881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's for info but adding FLASH NOUNSECURE line to "preload" command file didn't help in any way :/&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW is it normal that apart from erase_unsecure command file all others are empty?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 20:03:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212844#M8881</guid>
      <dc:creator>mroczeks</dc:creator>
      <dc:date>2012-03-06T20:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212845#M8882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to unsecure your part first. Then use NOUNSECURE.&lt;/P&gt;&lt;P&gt;Yes. it is normal.&lt;/P&gt;&lt;P&gt;If unsecure.cmd fails, then try downloading from &lt;A href="http://www.pemicro.com" rel="nofollow" target="_blank"&gt;www.pemicro.com&lt;/A&gt; Unsecure_12 utility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 20:55:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212845#M8882</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-03-06T20:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212846#M8883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that with no success.&lt;/P&gt;&lt;P&gt;Here's part of HiWave's command window content just when preload command file is to be executed:&lt;/P&gt;&lt;PRE&gt;FP: FLASH parameters loaded for MC9S12XEG128_V2(NVMIF2 rev 1,1,1,1,1) from D:\Programy\Freescale\CWS12v5.1\prog\FPP\mcu02DD.fppexecuting cmd\P&amp;amp;E_Multilink_USB_Preload.cmd!// Before load the commands written below will be executed!FLASH NOUNSECUREdone cmd\P&amp;amp;E_Multilink_USB_Preload.cmdPreload command file correctly executed.USB HCS08/HCS12 MULTILINK detected - Flash Version 5.84executing cmd\P&amp;amp;E_Multilink_USB_Reset.cmd!// After reset the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Reset.cmdReset command file correctly executed.      MCU clock speed: 2012000 HzBlock Module Name      Address Range   Status   0  PFLASH            4000 -  7FFF   Blank - Unselected   1  PFLASH            C000 -  FFFF   Blank - Unselected   2  PFLASH          E08000 -E3BFFF   Blank - Unselected   3  PFLASH          FC8000 -FFBFFF   Blank - Unselected   4  DFLASH             800 -1F0BFF   Blank - UnselectedFP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the PFLASH flash module =&amp;gt; Skipped.FP: The UNPROTECT command is not available for the DFLASH flash module =&amp;gt; Skipped.executing cmd\P&amp;amp;E_Multilink_USB_Vppon.cmd!// Before programming the flash, the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Vppon.cmdVppon command file correctly executed.FP: Arm FLASH for loading.executing cmd\P&amp;amp;E_Multilink_USB_Vppon.cmd!// Before programming the flash, the commands written below will be executeddone cmd\P&amp;amp;E_Multilink_USB_Vppon.cmdVppon command file correctly executed.executing D:\Repozytoria\Code\Proj...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Then it continues with the rest of command files ending with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;executing cmd\P&amp;amp;E_Multilink_USB_Postload.cmd!// After load the commands written below will be executed done cmd\P&amp;amp;E_Multilink_USB_Postload.cmdPostload command file correctly executed.                                                                                                                      ^Error: Loading failed!&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Again, no problems when using code with no usage of SEC bits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 22:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212846#M8883</guid>
      <dc:creator>mroczeks</dc:creator>
      <dc:date>2012-03-06T22:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: S12XE programming and debugging issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212847#M8884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know what's your problem, but&amp;nbsp;you need to use FLASH NOUNSECURE in case you define NVSEC byte in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 16:45:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XE-programming-and-debugging-issue/m-p/212847#M8884</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-03-07T16:45:00Z</dc:date>
    </item>
  </channel>
</rss>

