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.

MSPM0L1306: Flash multiple device by Uniflash Standalone Command Line at the same time

Part Number: MSPM0L1306
Other Parts Discussed in Thread: UNIFLASH,

Hi,guys,

     I have some questions on flashing by using Uniflash Standalone Command Line.I use the SEGGER J-Link Emulator to connect device and I want to flash multiple device by one PC at the same time.But I don't find there is any parameter to bind the J-LINK SN.Is there any way to help me to solve the problem?I'll apreciate for your helping!

@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/MSPM0L1306.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/program.txt" 
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]
)
	
	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 https://software-dl.ti.com/ccs/esd/uniflash/docs/latest_qsguide.html#command-line-interface
echo.

CMD /S /C "%EXECUTABLE% !MODE! !USEROPTIONS! !ADDITIONALS!"
pause
exit /b !errorlevel!

  • Hi Joey,

    I found something regarding this in the Uniflash user guide. It appears possible, at least for XDS family of programmers.  I didn't see anything about Segger, but there is plenty of information about configuration, you might be able to do the same with Segger.

  • hi,Dennis,

    Thanks for your suggestion,I had tried it like you provide,but it doesn't work.By the way,adding xml flie to fix the problem is what i thought at first.Because I found some information about SEGGER J-Link Emulator in MSPM0L1306.ccxml.Is it available?Anyway,thanks for your help again!

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="configuration_0">
            <instance XML_version="1.2" desc="SEGGER J-Link Emulator" href="connections/segger_j-link_connection.xml" id="SEGGER J-Link Emulator" xml="segger_j-link_connection.xml" xmlpath="connections"/>
            <connection XML_version="1.2" id="SEGGER J-Link Emulator">
            	
            		   <instance XML_version="1.2" href="drivers/jlinkcs_dap.xml" id="drivers" xml="jlinkcs_dap.xml" xmlpath="drivers"/>
            	
            		   <instance XML_version="1.2" href="drivers/jlinkcortexm0p.xml" id="drivers" xml="jlinkcortexm0p.xml" xmlpath="drivers"/>
            	
            		   <instance XML_version="1.2" href="drivers/jlinksec_ap.xml" id="drivers" xml="jlinksec_ap.xml" xmlpath="drivers"/>
            	
                
                <platform XML_version="1.2" id="platform_0">
                    <instance XML_version="1.2" desc="MSPM0L1306" href="devices/MSPM0L1306.xml" id="MSPM0L1306" xml="MSPM0L1306.xml" xmlpath="devices"/>
                </platform>
            </connection>
        </configuration>
    </configurations>
    

  • Hi Joey,

    By chance, have to looked at the Segger website?  Maybe there is some information regarding using multiple J-Link programmers.

  • Hi, Dennis,

    Thanks for your help!I had fixed the problem by using JFlash instead of Uniflash.