Thread 中讨论的其他器件:UNIFLASH
工具/软件:
尊敬的专家:
我的 CM 客户可以通过 Uniflash 烧录两个寄存器 Z1OTP-GPREG1和 Z1OTP-GPREG3 (图1)。 为了促进生产线的生产、他们希望通过批处理文件来实现此功能。 如何实现这一点? 谢谢你。
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.
工具/软件:
尊敬的专家:
我的 CM 客户可以通过 Uniflash 烧录两个寄存器 Z1OTP-GPREG1和 Z1OTP-GPREG3 (图1)。 为了促进生产线的生产、他们希望通过批处理文件来实现此功能。 如何实现这一点? 谢谢你。
您好、Angela、
@echo off setlocal setlocal ENABLEDELAYEDEXPANSION REM Path to this batch script set UNIFLASH_PATH=%~dp0 REM Path to DebugServer folder set DEBUGSERVER_ROOT=%~dp0ccs_base\DebugServer\ set MODE=flash set EXECUTABLE="!DEBUGSERVER_ROOT!bin\DSLite" set GENERATED_COMMAND=-c user_files/configs/f280025c.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/led_ex1_blinky.out" -a Z1GPREGProgram -a Z1OTPBOOTCTRLProgram set ADDITIONALS= REM list available modes if "%1"=="--listMode" ( echo. echo Usage: dslite --mode ^<mode^> arg echo. echo Available Modes for UniFlash CLI: echo * flash [default] - on-chip flash programming echo * memory - export memory to a file echo * load - simple loader [use default options] echo * serial - serial flash programming echo * noConnectFlash - bypasses connect sequence during flash; for programming a blank CC23xx device if exist !DEBUGSERVER_ROOT!drivers\MSP430Flasher.exe ( echo * mspflasher - support MSPFlasher command line parameters [deprecated] ) pause exit /b 0 ) REM no parameters given, use the default generated command if "%1" EQU "" ( echo Executing default command: echo ^> dslite --mode !MODE! !GENERATED_COMMAND! !ADDITIONALS! echo. CMD /S /C "%EXECUTABLE% !MODE! !GENERATED_COMMAND! !ADDITIONALS!" pause exit /b !errorlevel! ) REM user options parsing set USEROPTIONS=%* REM user options without the --mode set "_args=%*" set "_args=!_args:*%1 =!" set "_args=!_args:*%2 =!" if "%3"=="" ( set USEROPTIONS2= ) else ( set USEROPTIONS2=!_args! ) REM custom mode from users if "%1" EQU "--mode" ( set MODE=%2 set USEROPTIONS=!USEROPTIONS2! ) REM default user options if none given if "!USEROPTIONS!" EQU "" ( set USEROPTIONS=-h ) REM mspflasher support if "%MODE%" EQU "mspflasher" ( set EXECUTABLE=!DEBUGSERVER_ROOT!drivers\MSP430Flasher.exe set MODE= ) REM execute with given user parameters echo Executing the following command: if "!MODE!" EQU "" ( echo ^> !EXECUTABLE! !USEROPTIONS! !ADDITIONALS! ) else ( echo ^> !EXECUTABLE! !MODE! !USEROPTIONS! !ADDITIONALS! ) echo. echo For more details and examples, please visit software-dl.ti.com/.../latest_qsguide.html echo. CMD /S /C "%EXECUTABLE% !MODE! !USEROPTIONS! !ADDITIONALS!" exit /b !errorlevel!
编辑了通过针对 dslite.bat 的 UniFlash 包生成过程中生成的批处理文件。
为了执行 OTP 寄存器的烧录操作、我在 set generate_command 行中添加了附加参数:
-A Z1GPREGProgram -A Z1OTPBOOTCTRLProgram
请注意、这两个都是应用程序烧录操作后的内容。 还应注意、对于用户想要执行的任何 GUI 操作、闪存属性 XML 文件中将这些操作引用为操作:
uniflash_9.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\propertyDB\TMS320F28002x_128KB_FlashProperties.xml
例如: <action>。DDPActiveDebugSession。flash.performOperation ("Z1OTPBOOTCTRLProgram")</action>
其中 Z1OTPBOOTCTRLProgram 是 UniFlash CLI 接口所需的操作。
在代码片段中添加了 PAUSE 语句、以防他们希望在命令提示符的步骤中看到该过程(如果不需要、可以删除)。
谢谢。此致、
Charles