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.

TMS320F280025: Flash the .out file with a batch file

Part Number: TMS320F280025
Other Parts Discussed in Thread: UNIFLASH

Hi team,

Here's an issue from the customer may need your help:

Referenced to uniflash.bat and uniFlash_example.bat file under C:\ti\ccs1040\ccs\ccs_base\scripting\examples\uniflash\cmdLine, the customer wrote a .bat script to flash the F280025 .out file. 

The .bat file section is as follows: 

set UNIFLASH_TOOLS="C:\ti\ccs1040\ccs\ccs_base\scripting\examples\uniflash\cmdLine\uniflash.bat"
set CCXML_FILE=".\F280025_BOOT.ccxml"
set OUT_FILE=".\F280025_BOOT.out"

call %UNIFLASH_TOOLS% -ccxml %CCXML_FILE% -setOptions FlashEraseSelection="Selected Sectors Only" FlashC28Bank0Sector0=true FlashC28Bank0Sector1=true -operation Erase -program %OUT_FILE% -targetOp run

Erase-only sector0 and sector1 are set in the simulator configuration file F280025_boot.CCXML, as is the case in the .bat script.

However, in fact, a total of 16 sectors are erased from Sector0 to Sector15, as shown in the following figure: 

In the uniFlash_example.bat file, here's a description as follows: 

REM 5. Use the -core argument for multicore devices (ie; Concerto accessing the C28 core), load settings from a session file (changes default to erase Necessary Sectors Only), load a program, and running the target after program load
uniflash -ccxml ../configs/F28M35H52C1_XDS560.ccxml -core "C28" -loadSettings ../session/f28m35.session -program ../programs/f28m35_c28_blinky.out -targetOp run

How to set up the required .session file to erase and program some sectors? 

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hello Cherry,

    call %UNIFLASH_TOOLS% -ccxml %CCXML_FILE% -setOptions FlashEraseSelection="Selected Sectors Only" FlashC28Bank0Sector0=true FlashC28Bank0Sector1=true -operation Erase -program %OUT_FILE% -targetOp run

    The issue is that the default option for the sectors is "true". So unless you explictly set a sector to "false, it will just use "true". So in the command above, it will erase all sectors.

    To only erase the first two sectors, the customer must specify sectors 2 to 15 as "false".

    Example:

    call %UNIFLASH_TOOLS% -ccxml %CCXML_FILE% -setOptions FlashEraseSelection="Selected Sectors Only" FlashC28Bank0Sector0=true FlashC28Bank0Sector1=true FlashC28Bank0Sector2=false FlashC28Bank0Sector3=false FlashC28Bank0Sector4=false FlashC28Bank0Sector5=false FlashC28Bank0Sector6=false FlashC28Bank0Sector7=false FlashC28Bank0Sector8=false FlashC28Bank0Sector9=false FlashC28Bank0Sector10=false FlashC28Bank0Sector11=false FlashC28Bank0Sector12=false FlashC28Bank0Sector13=false FlashC28Bank0Sector14=false FlashC28Bank0Sector15=false -operation Erase -program %OUT_FILE% -targetOp run

    It is indeed inconvienent. I wish you could specify a range but as far as I know you have to do each individually.

    Thanks

    ki

  • Hi Ki,

    Thanks for your support and this issue has been resolved.

    One more question, does the -program command have erase and write flash capability? Is it required to configure the -operation Erase command separately to erase? 

    Thanks and regards,

    Cherry

  • Thanks for your support and this issue has been resolved.

    Great!

    One more question, does the -program command have erase and write flash capability? Is it required to configure the -operation Erase command separately to erase? 

    When using the "flash" mode, UniFlash will use whatever default erase settings before flashing the device. This typically erases all of flash before programming.

    Hope this helps

    ki