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.

CC2640: Flashing cc2640 through I-jet from command line

Part Number: CC2640

Hello,

I want to flash cc2640 from command line. I am using cc2650lp_app.FlashROM.cspy  and using following command in bat script

cc2650lp_app.FlashROM.cspy my_file.hex --download_only


It downloads the file but script does ends automatically. Following is the output i got from running the above command:

I have also attached cc2650lp_app.FlashROM.cspy file.

But if i run cc2650lp_app.FlashROM.cspy directly from command line with same command it shows following.

Can you please help me how to use the cc2650lp_app.FlashROM.cspy to flash from bat script and exit the script after flashing?

following is the code of cc2650lp_app.FlashROM.cspy

@REM This batch file has been generated by the IAR Embedded Workbench
@REM C-SPY Debugger, as an aid to preparing a command line for running
@REM the cspybat command line utility using the appropriate settings.
@REM
@REM Note that this file is generated every time a new debug session
@REM is initialized, so you may want to move or rename the file before
@REM making changes.
@REM
@REM You can launch cspybat by typing the name of this batch file followed
@REM by the name of the debug file (usually an ELF/DWARF or UBROF file).
@REM
@REM Read about available command line parameters in the C-SPY Debugging
@REM Guide. Hints about additional command line parameters that may be
@REM useful in specific cases:
@REM   --download_only   Downloads a code image without starting a debug
@REM                     session afterwards.
@REM   --silent          Omits the sign-on message.
@REM   --timeout         Limits the maximum allowed execution time.
@REM 
@echo off 
if not "%~1" == "" goto debugFile 
@echo on 
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5_2\common\bin\cspybat" -f "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650lp\simple_peripheral\iar\app\settings\cc2650lp_app.FlashROM.general.xcl" --backend -f "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650lp\simple_peripheral\iar\app\settings\cc2650lp_app.FlashROM.driver.xcl" 
@echo off 
goto end 
:debugFile 
@echo on 
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5_2\common\bin\cspybat" -f "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650lp\simple_peripheral\iar\app\settings\cc2650lp_app.FlashROM.general.xcl" "--debug_file=%~1" --backend -f "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650lp\simple_peripheral\iar\app\settings\cc2650lp_app.FlashROM.driver.xcl" 
@echo off 
:end

Thanks a lot.

  • Hi,
    I'm not really familiar with IAR's generated C-SPY files, but the error message you get when running the command directly ("invalid flash configuration file") indicates that the project uses an invalid .board file, which you should look into. I'm guessing the IAR "xcl" file references this somewhere.