<?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: How to set PC using usbdmscript.exe ? in OSBDM and TBDML</title>
    <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1460570#M3702</link>
    <description>&lt;P&gt;UsbdmScript uses internal register numbers defined in:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/podonoghue/usbdm-eclipse-makefiles-build/blob/master/Shared/src/USBDM_API.h" target="_self"&gt;https://github.com/podonoghue/usbdm-eclipse-makefiles-build/blob/master/Shared/src/USBDM_API.h&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are also some special commands such as wpc.&lt;/P&gt;&lt;P&gt;wc &amp;lt;value&amp;gt; - Write control register&lt;BR /&gt;wpc &amp;lt;value&amp;gt; - Write to PC&lt;BR /&gt;wreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write core register&lt;BR /&gt;wdreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write debug register&lt;BR /&gt;wcreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write control register&lt;/P&gt;&lt;P&gt;Registers vary by target type&lt;/P&gt;&lt;P&gt;You can use the following to give names to registers (HCS12 example):&lt;/P&gt;&lt;PRE&gt;proc hcs12regs { } {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set PC 3     ;# PC reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set D 4      ;# D reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set X 5      ;# X reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set Y 6      ;# Y reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set SP 7     ;# SP reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set CCR 0x80 ;# CCR reg - redirected to USBDM_ReadDReg()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;You can then add the above to &lt;STRONG&gt;&lt;EM&gt;usbdm_rc.tcl&lt;/EM&gt;&lt;/STRONG&gt;. Then commands will be more readable:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;EM&gt;hcs12regs&lt;/EM&gt;&lt;/STRONG&gt; ;# once only or add to usbdm_rc.tcl if this is the only target you use.&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;wreg $Y 100&lt;/STRONG&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;bye&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 05:55:13 GMT</pubDate>
    <dc:creator>pgo</dc:creator>
    <dc:date>2022-05-19T05:55:13Z</dc:date>
    <item>
      <title>How to set PC using usbdmscript.exe ?</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1458831#M3699</link>
      <description>&lt;P&gt;HI, i want to set program counter (PC register) to a given value.&lt;/P&gt;&lt;P&gt;I guess this can be done using the rreg/wreg commands, but i don't know the register-number to enter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 20:25:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1458831#M3699</guid>
      <dc:creator>Mindblaster</dc:creator>
      <dc:date>2022-05-16T20:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set PC using usbdmscript.exe ?</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1459046#M3700</link>
      <description>&lt;P&gt;For some reason i do not understand, i found out that PC is register number "3", so&lt;/P&gt;&lt;P&gt;wreg 3 0x8000&lt;/P&gt;&lt;P&gt;did the job&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;% wreg 3 0x8000
:wReg r=0x3(PC)&amp;lt;-0x00008000&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 17 May 2022 06:30:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1459046#M3700</guid>
      <dc:creator>Mindblaster</dc:creator>
      <dc:date>2022-05-17T06:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set PC using usbdmscript.exe ?</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1460570#M3702</link>
      <description>&lt;P&gt;UsbdmScript uses internal register numbers defined in:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/podonoghue/usbdm-eclipse-makefiles-build/blob/master/Shared/src/USBDM_API.h" target="_self"&gt;https://github.com/podonoghue/usbdm-eclipse-makefiles-build/blob/master/Shared/src/USBDM_API.h&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are also some special commands such as wpc.&lt;/P&gt;&lt;P&gt;wc &amp;lt;value&amp;gt; - Write control register&lt;BR /&gt;wpc &amp;lt;value&amp;gt; - Write to PC&lt;BR /&gt;wreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write core register&lt;BR /&gt;wdreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write debug register&lt;BR /&gt;wcreg &amp;lt;regNo&amp;gt;&amp;lt;value&amp;gt; - Write control register&lt;/P&gt;&lt;P&gt;Registers vary by target type&lt;/P&gt;&lt;P&gt;You can use the following to give names to registers (HCS12 example):&lt;/P&gt;&lt;PRE&gt;proc hcs12regs { } {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set PC 3     ;# PC reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set D 4      ;# D reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set X 5      ;# X reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set Y 6      ;# Y reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set SP 7     ;# SP reg&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set CCR 0x80 ;# CCR reg - redirected to USBDM_ReadDReg()&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;You can then add the above to &lt;STRONG&gt;&lt;EM&gt;usbdm_rc.tcl&lt;/EM&gt;&lt;/STRONG&gt;. Then commands will be more readable:&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;EM&gt;hcs12regs&lt;/EM&gt;&lt;/STRONG&gt; ;# once only or add to usbdm_rc.tcl if this is the only target you use.&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;wreg $Y 100&lt;/STRONG&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;bye&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 05:55:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1460570#M3702</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2022-05-19T05:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set PC using usbdmscript.exe ?</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1460998#M3703</link>
      <description>&lt;P&gt;Veeery cool! This is an extremely good tool, i used it a lot. Also many thanks for the new, advanced GUI and the option to also read back EEPROM pages, save/load setup and more address-fields, that was really missing &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;Maybe you could also add a setting to access paged RAM?&lt;/P&gt;&lt;P&gt;I also wonder why the "regs" command of usbdmscript does not tell CCR flags, this would be very helpfull for branch commands an such.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 14:52:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1460998#M3703</guid>
      <dc:creator>Mindblaster</dc:creator>
      <dc:date>2022-05-19T14:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set PC using usbdmscript.exe ?</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1461420#M3704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It would probably be sensible to add CCR to regs for HCS12.&amp;nbsp; The only reason it wasn't is that the CCR is accessed differently to the other registers in the BDM interface.&lt;/P&gt;&lt;P&gt;You can read the CCR by either:&lt;/P&gt;&lt;PRE&gt;rreg 0x80 ;# it reports unknown register but it gives the correct value (same as below command).&lt;BR /&gt;rdreg 0xff06 ;# this is a special debug command to access the temporary register containing the CCR value.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 08:16:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/How-to-set-PC-using-usbdmscript-exe/m-p/1461420#M3704</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2022-05-20T08:16:48Z</dc:date>
    </item>
  </channel>
</rss>

