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.

MSP430FR2433: uniflash CLI target is halted after flashing

Part Number: MSP430FR2433
Other Parts Discussed in Thread: UNIFLASH, MSP-FET, , MSP-EXP430FR2433

Hello All,

When I flash the MSP via the UniFlash GUI the target is running when the process completes. When I flash via the CLI ( created by the UniFlash ) the target seems to be halted.

I did try to add Reset operation ( both hard and soft ) but this didn't do the trick. What should I do to make the CLI act the same way as the GUI ? 

Thanks !

  • Hi David

    May I know which hardware platform you used on FR2433 programming through Uniflash?

    and which version uniflash you used? stand-alone version or cloud version?

    Thanks!

  • Hey, 

    I use MSP-FET to program the MCU with the stand-alone version.

  • Hi David

    What is your MCU board. It is the socket board or your designed board?

  • Hi David

    May I know you can connect the target MCU (FR2433) using CCS through JTAG or SBW?

    Thanks!

  • This is our own board. We use IAR not CCS. The physical connection to the MSP-FET is SBW ( 3 pins - TCK , TDIO, GND ).

  • Hi David 

    means that your system is OK for SWB programming and debug. is my understanding is correct?

    target MCU is halted using command line interface (CLI)

    if you just use the GUI on program, verify operations, these features are OK or not?

    Thanks!

  • program and verify operations are ok both from the CLI and GUI. From the GUI the target is not halted when the operations complete,  but from the CLI it is halted. I want the CLI to not halt the target when program and verify operations are completed.  

    Thank you for your help !

  • Hi David 

    In case MCU works normally using uniflash GUI, please use GUI on MCU programming.

    I will try to reproduce the issue using CLI and feedback to our team

    Thanks!

  • This doesn't really help me as I need means to flash my target via scripts. How come there is no settings which says to leave the target running after the operation is done ? 

  • Hi David

    So far, I understand CLI is needed using batch script programming.

    because we haven't meet the similar halted issue on Uniflash and FR2433. I need reproduce this issue.

    Could you please share your script, I will reproduce on uniflash and FR2433 board.

    Thanks

  • What script ? 

    I just call this line 

    dslite.bat --mode flash -c user_files/configs/MSP430FR2433.ccxml --verbose --reset 1 --flash --verify "user_files/images/application.bin,0xc400" "user_files/images/bootloader.bin,0xfc20"

     
    So the only "special" thing I do is flashing two binary files.
  • Hi David

    Yes. this command line is what I need. I am out of office today. Let me find some bandwidth to try this command line on my board.

    Thanks

  • FYI I tried it with --reset 0 and without --reset at all. None of them makes the target run after the download + verify is completed. 

  • Hi David,

    The easiest way is to create a CLI package use the standalone commend line tool is as below

    Before you generate the package you should choose the image you would like to flash and configured the flash settings accordingly like below

  • This is exactly what I did and what I use. 

  • I have try it on myside with MSP430FR2433 with no problem few comments here.

    1. You can try the zip file that I have tested, my code is just to toggle P1.0 uniflash_windows.zip

    2. You have mentioned that you can use Uniflash GUI with no problem that means the hardware connection should be no problem.

    3. Notice that when the MSP-FET finish the download it will turn off the power. You can find other 3.3v power supply to power the device to see if the code is running 

  • Hii, Thank you for your help.

    I am not able to try your binary because I don't have means to look at P1.0 and see if it toggles. I created a binary which toggles P2.3.

    When I flash this binary via the UniFlash GUI it works as expected : 

    please note that I flash this binary to specific address. 

    When I try to flash the same binary via uniflash_windows.zip ( that you created. I just added the binary to the correct folder) P2.3 doesn't toggle after the flashing is complete. 

    I use this command to flash : 

    dslite --mode flash -c user_files/configs/MSP430FR2433.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/bootloader.bin,0xfc20"

    Here is the binary file that I use: 

    bootloader.bin

    Would you be able to try exactly what i am doing and tell me if you see different results ? 

    Thank you very much !

  • I just tried your binary on an MSP-EXP430FR2433 development kit and I experience the same thing I see on my board. Works via GUI doesn't work via cli. 

  • I am not using the dslite.exe with the command you listed. I just unzip the zip file and double click the dslite.bat file. And it will download the image automatically. It should work I have try it on my side.

  • Here are videos of what I am experiencing I don't have any other means to explain it better:

    GUI VIDEO - LED BLINKS

    CLI VIDEO - LED DOESN'T BLINK

    I understand that it should work... but it doesn't work for me. How we debug the issue ? are there any logs I can send you is there any thing I can share that will help to solve the problem ? 

  • Hi David,

    Sorry for the late response. Got your point now. The the code is not be run after program due to the default command have not use -u. If you add the this commend the code will running after the flash finished.  You can replace the dslite.bat as below.

    dslite.bat
    @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/MSP430FR2433.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v -u "user_files/images/FR2433_LED_Toggle.out" 
    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
    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 
    REM	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!"
    exit /b !errorlevel!

  • You are right. It is not update in the document, we will fix it later. Thanks for your feedback.

**Attention** This is a public forum