This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] [参考译文] [常见问题解答] CCSTUDIO-MSP:如何在 Code Composer Studio (CCS)中手动选择 JTAG 接口类型

Guru**** 655270 points
Other Parts Discussed in Thread: UNIFLASH
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1045732/faq-ccstudio-msp-how-to-manually-select-a-jtag-interface-type-in-code-composer-studio-ccs

器件型号:CCSTUDIO-MSP

默认情况下、CCS 将根据器件和调试器自动检测 JTAG 接口。 但是、您可能需要手动将接口类型更改为2线 SBW 或4线 JTAG。 目前、CCS 不允许您在不对驱动程序进行一些手动更改的情况下更改 JTAG 接口。 以下是有关如何使用 CCS v10执行此操作的说明。

步骤1. 确保 CCS 已关闭、并在文本编辑器中打开以下文件(假设是默认安装位置)。

C:\ti\ccs \ccs\ccs_base\common\targetdb\drivers\msp430_emu.xml

步骤2. 根据您的特定器件系列更新"m4430_emu.xml"。 您将看到每个系列的几个"ISA"部分、因此请根据您的器件在相应部分中进行更改。

原始"m4430_emu.xml"

<?xml version="1.0"?>

<drivers id="MSP430">
                <isa Type="MSP430" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430L092" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="Emulation Type" desc="Emulation Types" Type="choicelist" id="emuType" Value="0">
                                                                <choice value="Normal"/>
                                                                <choice value="ROM"/>
                                                </property>
                                                <property Type="hiddenfield" id="NormalActivationCode" Value="0xA55AA55A"></property>
                                                <property Type="hiddenfield" id="ROMActivationCode" Value="0x5AA55AA5"></property>
                                                <property Type="hiddenfield" id="supportExtMemDL" Value="true"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430C09x" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="8"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="8"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430FR57xx" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
												<property Type="hiddenfield" id="supportLPMx5" Value="true"></property>
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="0"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="120"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
				<isa Type="MSP430FR59xx" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
												<property Type="hiddenfield" id="supportLPMx5" Value="true"></property>
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="0"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="120"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430F1xx_SLOW" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="RF430FRL15X" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="Emulation Type" desc="Emulation Types" Type="choicelist" id="emuType" Value="0">
                                                                <choice value="Normal"/>
                                                                <choice value="ROM"/>
                                                </property>
                                                <property Type="hiddenfield" id="NormalActivationCode" Value="0xA55AA55A"></property>
                                                <property Type="hiddenfield" id="ROMActivationCode" Value="0x5AA55AA5"></property>
                                                <property Type="hiddenfield" id="supportExtMemDL" Value="true"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>

		<isa Type="CORTEX_M4_432" ProcID="0x75803800">
		        <driver file="../../DebugServer/drivers/msp430_emu.dvr">
		            <connectionType Type="MSP430"/>
		            <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
		            <property Type="hiddenfield" Value="MSP430" id="interface" />
		            <property Type="hiddenfield" Value="true" id="haltOnConnectByDefault" />
		            <property Type="hiddenfield" Value="true" id="supportsNonIntrusiveConnect" />
		            <property Type="hiddenfield" Value="true" id="disableInternalFlashManager" />
		            <property Type="hiddenfield" Value="true" id="disableArmAdvancedFeatures" />
		            <property Type="hiddenfield" Value="true" id="disableSoftwareBreakpoint" />
		            <property Type="hiddenfield" Value="true" id="disableSoftLaunch" />
		            <property Type="hiddenfield" Value="true" id="msp432fet" />
		            <property Name="JTAG/SWD (Auto-detect)" desc="JTAG/SWD (Auto-detect)" Type="choicelist" id="interfaceSpeed" Value="1">
		                <choice Name="Fast" value="0"/>
		                <choice Name="Medium" value="1"/>
		                <choice Name="Slow" value="2"/>
		            </property>
		            <property Type="hiddenfield" Value="true" id="Make Device Secure" />
		        </driver>
	    </isa>
	    <isa Type="CS_DAP" ProcID="0x38000405">
        	<driver file="NONE">
	            <connectionType Type="MSP430"/>
        	</driver>
	    </isa>

</drivers>

添加了接口类型属性

<property Name="Interface Type" desc="Interface Type" Type="choicelist" id="interfaceType" Value="3">
  <choice Name="4 Wire JTAG protocol used" value="0"/>
  <choice Name="2 Wire (Spy-bi-wire) JTAG protocol used" value="1"/>
  <choice Name="2 Wire Devices accessed by 4wire JTAG protocol" value="2"/>
  <choice Name="Protocol will be detected automatically" value="3"/>
</property>

修改了"m4430_emu.xml"

<?xml version="1.0"?>

<drivers id="MSP430">
                <isa Type="MSP430" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Name="Interface Type" desc="Interface Type" Type="choicelist" id="interfaceType" Value="3">
                                                  <choice Name="4 Wire JTAG protocol used" value="0"/>
                                                  <choice Name="2 Wire (Spy-bi-wire) JTAG protocol used" value="1"/>
                                                  <choice Name="2 Wire Devices accessed by 4wire JTAG protocol" value="2"/>
                                                  <choice Name="Protocol will be detected automatically" value="3"/>
                                                </property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430L092" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="Emulation Type" desc="Emulation Types" Type="choicelist" id="emuType" Value="0">
                                                                <choice value="Normal"/>
                                                                <choice value="ROM"/>
                                                </property>
                                                <property Type="hiddenfield" id="NormalActivationCode" Value="0xA55AA55A"></property>
                                                <property Type="hiddenfield" id="ROMActivationCode" Value="0x5AA55AA5"></property>
                                                <property Type="hiddenfield" id="supportExtMemDL" Value="true"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430C09x" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="8"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="8"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430FR57xx" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
												<property Type="hiddenfield" id="supportLPMx5" Value="true"></property>
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="0"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="120"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
				<isa Type="MSP430FR59xx" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
												<property Type="hiddenfield" id="supportLPMx5" Value="true"></property>
                                                <property Type="stringfield" id="password" Name="Password: (HEX format)"></property>
                                                <property Type="hiddenfield" id="passwordMinLength" Value="0"></property>
                                                <property Type="hiddenfield" id="passwordMaxLength" Value="120"></property>
                                                <property Name="Interface Type" desc="Interface Type" Type="choicelist" id="interfaceType" Value="3">
                                                  <choice Name="4 Wire JTAG protocol used" value="0"/>
                                                  <choice Name="2 Wire (Spy-bi-wire) JTAG protocol used" value="1"/>
                                                  <choice Name="2 Wire Devices accessed by 4wire JTAG protocol" value="2"/>
                                                  <choice Name="Protocol will be detected automatically" value="3"/>
                                                </property>
												<property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="1">
                                                  <choice Name="Fast" value="0"/>
                                                  <choice Name="Medium" value="1"/>
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="MSP430F1xx_SLOW" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>
                <isa Type="RF430FRL15X" ProcID="0x6b800000">
                                <driver file="../../DebugServer/drivers/msp430_emu.dvr">
                                                <connectionType Type="MSP430"/>
                                                <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
                                                <property Type="hiddenfield" Value="MSP430" id="interface" />
                                                <property Name="Emulation Type" desc="Emulation Types" Type="choicelist" id="emuType" Value="0">
                                                                <choice value="Normal"/>
                                                                <choice value="ROM"/>
                                                </property>
                                                <property Type="hiddenfield" id="NormalActivationCode" Value="0xA55AA55A"></property>
                                                <property Type="hiddenfield" id="ROMActivationCode" Value="0x5AA55AA5"></property>
                                                <property Type="hiddenfield" id="supportExtMemDL" Value="true"></property>
                                                <property Name="JTAG/SBW Speed" desc="JTAG/SBW Speed" Type="choicelist" id="interfaceSpeed" Value="0">
                                                  <choice Name="Slow" value="2"/>
                                                </property>
                                </driver>
                </isa>

		<isa Type="CORTEX_M4_432" ProcID="0x75803800">
		        <driver file="../../DebugServer/drivers/msp430_emu.dvr">
		            <connectionType Type="MSP430"/>
		            <property Type="hiddenfield" Value="msp430.dll" id="dllName" />
		            <property Type="hiddenfield" Value="MSP430" id="interface" />
		            <property Type="hiddenfield" Value="true" id="haltOnConnectByDefault" />
		            <property Type="hiddenfield" Value="true" id="supportsNonIntrusiveConnect" />
		            <property Type="hiddenfield" Value="true" id="disableInternalFlashManager" />
		            <property Type="hiddenfield" Value="true" id="disableArmAdvancedFeatures" />
		            <property Type="hiddenfield" Value="true" id="disableSoftwareBreakpoint" />
		            <property Type="hiddenfield" Value="true" id="disableSoftLaunch" />
		            <property Type="hiddenfield" Value="true" id="msp432fet" />
		            <property Name="JTAG/SWD (Auto-detect)" desc="JTAG/SWD (Auto-detect)" Type="choicelist" id="interfaceSpeed" Value="1">
		                <choice Name="Fast" value="0"/>
		                <choice Name="Medium" value="1"/>
		                <choice Name="Slow" value="2"/>
		            </property>
		            <property Type="hiddenfield" Value="true" id="Make Device Secure" />
		        </driver>
	    </isa>
	    <isa Type="CS_DAP" ProcID="0x38000405">
        	<driver file="NONE">
	            <connectionType Type="MSP430"/>
        	</driver>
	    </isa>

</drivers>

步骤3. 保存该文件、然后重新打开 CCS。

步骤4. 双击项目文件夹、在 CCS Project Explorer 中选择并展开您的 CCS 项目。

步骤5. 双击"targetConfigs"文件夹将其展开。

步骤6. 双击以".ccxml"结尾的目标配置文件将其打开、然后单击"Advanced"选项卡。

步骤7. 单击"MSP430"CPU。

步骤8:在"CPU Properties"下、将"Interface Type"更改为"Protocol will be detected automatically"以外的内容。 请注意、某些选项可能会因您的器件而异。

步骤 9 (可选):根据需要调整通信速度以确保可靠通信。

步骤 10:单击"Save"(保存)以保存对目标配置的更改。

现在、假设硬件连接和 JTAG 电路都正确、您可以使用指定的接口对器件进行编程或调试。

注意:通过在该位置修改 UniFlash 的驱动程序、应该可以对 UniFlash 进行相同的更改。

C:\ti\uniflash_ \desktopdb\content\TICloudAgent\win\ccs_base\common\targetdb\drivers\msp430_emu.xml

如果这些步骤中的任何一个不清楚或遇到任何问题、请单击上面的"+Ask a related question"按钮以创建新帖子。

P.S. 感谢您的输入,@Chester Gillon。