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.

[FAQ] C2000 CCS Flash plugin and UniFlash

Other Parts Discussed in Thread: UNIFLASH, C2000WARE

This FAQ is aimed at using the TI C2000 Flash tools - CCS Flash plugin and UniFlash.
This FAQ is applicable for F28M35x, F28M36x, F2837xD, F2837xS, F2807x, F28004x, F28002x, F2838x, F28003x.

1) How can we improve the Flash tool performance?
A) Please see this FAQ:

2) Where can I access the Flash plugin GUI in CCS?
A) CCS Debug view -> Tools -> On-Chip Flash

3) Why am I not able to see the On-Chip Flash plugin in CCS?
A) While creating the target configuration file, please ensure to use one of the default devices shown in the drop down menu of the "Target configurations" view.
If you edit the default device XMLs provided in the CCS folder, flash plugin GUI may not show up.
Also, please check for updates in CCS and install if any provided for these packages: Debug Server Flash, CCS Flash Content and TI C2000 Device Support.

4) In the CCS flash plugin GUI, where is button to browse an application image to program in to the flash?
A) There is not a separate button for this in CCS (UniFlash has). You can browse the file using "CCS debug view -> Run -> Load -> Load Program".
If the application executable file has contents mapped to flash, CCS will automatically invoke the flash plugin to program the image to flash.

5) Why is the RAM content not programmed even though it is correctly mapped in the linker cmd file?
A) Flash tools are developed for fully flash-embedded applications only.
All the initialized sections should be mapped to Flash memory only in the Flash based linker command file. Any content mapped to RAM will not be gauranteed to load.
If any code needs to execute from RAM, it has to be mapped to flash for load and RAM for execution.
In the examples provided in C2000Ware, you will notice that all the functions that need to execute from RAM (for initialization or 0-wait performance purpose) are assigned to .TI.ramfunc section.
memcpy() function should be called in the application to copy the .TI.ramfunc content from Flash to RAM. memcpy() is called before executing any code that is assigned to .TI.ramfunc section.

6) Why CPU does not halt after loading the code in the flash using CCS flash plugin?
A) Please ensure that at least one hardware breakpoint is avaialble for CCS flash plugin to enable it at the application entry point. If not, plugin will not be able to set the breakpoint at main() or codestart.

7) Can I select the clock source in the CCS flash plugin and/or UniFlash?
A) You can select the clock source for F2837xD, F2837xS, F2807x, F28M35x and F28M36x devices. Default clock source used by the flash plugin for all the devices is INTOSC2.
We strongly suggest you to use the default clock source configuration provided in the flash tools and do not change it unless really required.
For F28004x, F28002x, F2838x devices, there is no provision for user to change the clock source - plugin uses INTOSC2 for these devices.

8) Does flash plugin and UniFlash save and restore the clock source configuration?
A) Not by default. For F2837xD, F2837xS, F2807x, F28M35x and F28M36x devices, there is an option to save/restore the clock source configuration.
However, we strongly suggest to ensure that the application configures the clock source as intended; and do not depend on the plugin to restore the saved configuration.

9) Can I configure the PLL in the CCS flash plugin and/or UniFlash?
A) You can configure for F2837xD, F2837xS, F2807x, F28M35x and F28M36x devices. Flash tools will report an error if the user chosen configuration violates the spec.
We strongly suggest you to use the default PLL and clock source configuration provided in the flash tools and do not change it unless really required.
For F28004x, F28002x, F2838x devices, there is no provision for user to configure the PLL - Plugin uses a static PLL configuration.

10) Does flash plugin and UniFlash save and restore the PLL configuration?
A) Not by default. For F2837xD, F2837xS, F2807x, F28M35x and F28M36x devices, there is an option to save/restore the PLL configuration.
However, we strongly suggest to ensure that the application configures the PLL as intended; and do not depend on the plugin to restore the saved configuration.

11) Can flash tools load the application in to flash even if the device is secured?
A) If the device is locked, flash tools require users to unlock the device to be able to do flash erase, program and other operations. Users can enter the password in the flash plugin GUI and unlock the device.

12) Can I choose which sectors should be erased during a program load in the flash tools?
A) Yes, you can uncheck the default "Entire Flash" setting and select the required sectors under the Erase Settings.

13) How can I avoid erasing sectors to which no content is mapped in my application?
A) That is a good idea to avoid unnecessary erase cycles. You can choose the "Necessary Sectors Only" option under the Erase Settings. Flash plugin will erase only the sectors to which the content is mapped in the user application.

14) How can I skip erase during a program load?
A) If you are sure that the flash is erased, you can skip erase by selecting "Program Only" option under Download settings in the flash tool GUI.

15) How can I do verify alone without erase/program operations?
A) You can select "Verify Only" option under Download settings in the flash tool GUI. Note that the device should be unlocked.

16) Can we program the flash with out verify?
A) Yes, unselect the default enabled "Verify Flash after Program" setting under Download Settings in the flash tools. This will help reduce the time it takes to complete the program operation.
However, if you disable the verify, we suggest to check the checksum (available in the flash tool) after the program operation and ensure the value is as expected.  Note that the checksum feature in the plugin calculates checksum for the entire memory ranges listed (like entire Flash, OTP, ECC, OTP ECC etc.) and is not limited to the address ranges used by the application.  Users can use the plugin checksum feature to ensure that the checksum matches between development and production when using the Uniflash as the production tool.  Below is the checksum algorithm used in the CCS flash plugin and Uniflash:

void main(void)


      uint16 checksum = 0;

      /* Calculate checksum for the address range provided */

      for(; param1 <= param2; param1+=1)


            checksum += *(unsigned int*)param1;



 Note: param1 and param2 are the start and end addresses of the memory range considered for the checksum calculation.

17) Can we skip programming the ECC?
A) Yes, you can unselect the default enabled "Auto ECC Generation" option under Download Settings in the flash tool GUI. However, we suggest to always program ECC to avoid ECC (NMI for uncorrectable) errors.

18) What are the different file formats supported for program operation?
A) TI COFF, TI ELF, Intel Hex, Motorola S-Record, Tektronix Hex, TI-TXT and binary formats are supported.

19) Can we download the programmed flash content as an executable file for later program usage?
A) Yes, you can export the flash content either as a TI COFF or binary file. In UniFlash memory browser view, you can use the "Export" button to download the flash contents for a given address range.  In CCS memory window, you can acheive the same by using the "Memory Browser menu -> Save memory" option.  When users have multiple images and would like to concatenate, they can load all the images in to the flash and then export all of them in to one executable file (will include unused spaces when given a range).  When loading multiple images, users should ensure to not erase the already programmed images (check the erase settings in the flash tools).  

20) How can I download (export) differnt selected address ranges in to one binary file from CCS or UniFlash for later program use?
A) When exporting as a binary file, only one address range can be selected since binary file does not contain address. If you want to download multiple ranges in to a single file, then please prefer COFF output format.

21) How can I avoid programming a few memory ranges from a given application image?v
A) Flash tools offer a feature called "Range avoidance". You can enter the all the address ranges in the flash tool GUI's "Range Avoidance Settings" in the ascending order separated by a comma.
Flash tools will avoid programming those address ranges even if the executable file has content mapped to those locations.
Note that the address ranges should be 128-bit aligned.
This feature can come handy when you know that only a few selected ranges differ between the programmed image and the yet-to program image; you can skip programming the address ranges that do not differ in the next image. That helps to reduce the erase/program time and save write/erase endurance as well.

22) Does "Calculate Checksum" feature include TI-OTP when calculating checksum for the OTP range?
A) No. It includes only the user DCSM OTP range.

23) I understand that flash plugin loads its code in to the device's RAM to do flash erase and program operations. Can flash plugin keep the RAM content intact to preserve the application context?
A) At the bottom of the flah plugin GUI, you will notice "Backup RAM during Flash programming/operations" radio button. This is disabled by default. You can enable and try this feature. However, please note
that this feature does not fully gaurantee that the RAM content will be saved and restored. Hence, before using the flash plugin, we suggest you to export the RAM contents using memory window's "save memory'feature in CCS (Export feature in UniFlash) and load it when needed after the flash plugin usage.

24) Does flash plugin save/restore all the device context after its execution?
A) No. Flash plugin does not gaurantee to restore the device context. Hence, it is important for user to issue a debug reset after the flash plugin operation and ensure that the application configures the device as needed.

25) To preserve the debug context, I would like the plugin to not reset the device when the target is connected. How can I acheive that?
A) In CCS 10 and onwards, flash plugin GUI provides a radio button to disable the "Reset on Connect". Note that it is enabled by default.

26) What is the debug information that we should send to TI for analyzing a flashing failure?
A) We need two peices of information:
(a) Enable the verbose output for the plugin using the "Enable Verbose Output" radio button available at the bottom fo the CCS flash plugin GUI and send us the console window output for the failure.
(b) Generate and share the debug server logs: You can generate the logs via "CCS Help menu -> CCS Support -> Select Debug Server Log -> Click on Properties -> Select Enable Debug Server Logging + Choose a log file location -> Click Ok".

27) Why did I get the error "Error initializing flash programming: Interface returned from dll, but flash is not available on this device."?

(a) Ensure that boot mode pins are configured for wait boot
(b) Ensure that power supply is in spec range during the flash operations
(c) Ensure that there are no any board defects
(d) Ensure that correct and valid target configuration file is used
(e) Check for updates in CCS and install any available updates

28) Why did I get the error "Please make sure the memory location you are programming have not already been programmed"?
A) Ensure that flash is erased before the program operation.

29) After loading the application in the flash using CCS flash plugin, do we need to do a reset and restart?
A) Yes, it is the suggested method. Flash Plugin does not restore any of the device configuration (like RAM content, PLL config, Flash control config, Flash ECC register config, DCC config or any other system or peripheral related config).
User application is supposed to configure all of this as needed after using the Flash Plugin. After loading the executable in the Flash memory using Flash Plugin, it is advised to do a reset/restart to bring the device to a known state before executing the programmed application.

30) Why did I get the error "Error setting the GSxMSEL register for Flash operations"?
A) Flash plugin uses shared RAM on F2837xD devices to load plugin's code. CPU2 needs shared RAM ownership to load plugin code for CPU2 flash operations. However, CPU1 only can give the
ownership of the shared RAM to CPU2. Hence, CPU1 should be connected for CPU2 flash operations. If CPU1 is not connected, GSxMSEL configuration will fail to give the ownership of shared RAM to CPU2.

31) For F28P65x CCS flash plugin and Uniflash, below usage notes will help:

TMS320F28P65x Flash plugin usage notes: Before doing any flash operations using the flash plugin,

(a) Please select which flash banks should be mapped to which CPU (CPU1 vs CPU2) - This selection should be done in CPU1 flash plugin GUI.

(b) Please select the flash banks that the user would like the flash plugin to erase (in the CPU1 flash plugin GUI and the CPU2 flash plugin GUI) 

(c) Please configure the PLL using the Configure Clock button in CPU1 flash plugin GUI before doing any CPU2 flash plugin operations (including loading any executable to CPU2 flash).

32) In F28P65x flash tool GUI (CCS On-chip flash tool and/or Uniflash), why can't we choose the sectors that we want the flash tool to erase during the program load or standalone erase?  

A) There are total of 640 sectors in F28P65x (max-configuration device); hence the individual sector selection options are not provided.  Instead, you can provide a sector protection mask in the flash plugin GUI under the Erase Settings (please see below snapshot).  Definition of the CMDWEPROT is mentioned in the GUI (near program settings).  Using this, the user can achieve the sector selection for erase and program operations.  Flash API guide also has the description of these CMDWEPROT registers.  

33) In the F28P65x flash tools (CCS On-chip flash plugin and Uniflash), why are we not able to program the USER OTPs of Bank1 to Bank4?  

A) Note that DCSM OTP is programmable by the CCS On-chip flash plugin and Uniflash.  However, USER OTPs of  Bank1 to Bank4 are not allowed for programming as of now in CCSv12.4 or CCSv12.5.  The On-chip flash plugin of CCSv12.6 (planned for release in January 2024) will allow programming of the USER OTPs of Bank1 to Bank4.

34) We are aware that the flash operations for F280033 device are supported in CCSv12.5 by default.  How can we get this support in CCSv12.4?

A) In CCSv12.4, user can replace the existing FlashPropertiesTranslator.xml (at ccs1240\ccs\ccs_base\DebugServer\propertyDB) with this below given file:  

<?xml version="1.0" encoding="UTF-8"?>
<FlashPropertiesTranslator xmlns:xsi="">
	<FlashProperties name="BL_CC13xxCC26xx">
		<partnum regex="^CC13.*\(Bootloader\)" />
		<partnum regex="^CC25.*\(Bootloader\)" />
		<partnum regex="^CC26.*\(Bootloader\)" />
	<FlashProperties name="BL_CC32xx">
		<partnum regex="^CC32.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP430Flash">
		<partnum regex="^MSP430F5.*\(Bootloader\)"/>
		<partnum regex="^MSP430F6.*\(Bootloader\)"/>
	<FlashProperties name="BL_MSP430FR2xx_4xx_1kB_BSL">
		<partnum regex="^MSP430FR21.*\(Bootloader\)" />
		<partnum regex="^MSP430FR20.*\(Bootloader\)" />
		<partnum regex="^MSP430FR4.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP430FR2xx">
		<partnum regex="^MSP430FR23.*\(Bootloader\)" />
		<partnum regex="^MSP430FR24.*\(Bootloader\)" />
		<partnum regex="^MSP430FR25.*\(Bootloader\)" />
		<partnum regex="^MSP430FR26.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP430FR5xx_6xx">
		<partnum regex="^MSP430FR5.*\(Bootloader\)" />
		<partnum regex="^MSP430FR6.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP432E4">
		<partnum regex="^MSP432E.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP432P4">
		<partnum regex="^MSP432P.*\(Bootloader\)" />
	<FlashProperties name="BL_MSPM0">
		<partnum regex="^MSPM0.*\(Bootloader\)" />
	<FlashProperties name="BL_MSP430Flash-Legacy">
		<partnum regex="^MSP430F1.*\(Bootloader\)" />
		<partnum regex="^MSP430F2.*\(Bootloader\)" />
		<partnum regex="^MSP430F4.*\(Bootloader\)" />
		<partnum regex="^MSP430G.*\(Bootloader\)" />
	<FlashProperties name="CC13x2x7_CC26x2x7">
		<partnum regex="^CC13[1|5]2[R|P]7" />
		<partnum regex="^CC2652[R|P]7" />
	<FlashProperties name="CC13x1_CC26x1">
		<partnum regex="^CC1311[R|P]3" />
		<partnum regex="^CC2651[R|P]3" />
	<FlashProperties name="CC13x4x10_CC26x4x10">
		<partnum regex="^CC13[1|5]4[R|P]10" />
		<partnum regex="^CC2674[R|P]10" />
		<partnum regex="^CC2653[R|P]10" />
	<FlashProperties name="CC23xx">
		<partnum beginsWith="CC23" />
	<FlashProperties name="CC25">
		<partnum beginsWith="CC25" />
		<partnum beginsWith="CM25" />
	<FlashProperties name="CC13x2">
		<partnum beginsWith="CC13*2" />
		<partnum beginsWith="CC13*4" />
	<FlashProperties name="CC26x2">
		<partnum beginsWith="CC26*2" />
		<partnum beginsWith="CC26*4" />
	<FlashProperties name="CC13">
		<partnum beginsWith="CC13" />
	<FlashProperties name="CC26">
		<partnum beginsWith="CC26" />
	<FlashProperties name="CC3220SF">
		<partnum beginsWith="CC3220SF" />
	<FlashProperties name="CC3235SF">
		<partnum beginsWith="CC3235SF" />
	<FlashProperties name="LMx">
		<partnum beginsWith="LM3" />
		<partnum beginsWith="LM4" />
	<FlashProperties name="TM4Ex">
		<partnum beginsWith="TM4E" />
		<partnum beginsWith="SC4E" />
	<FlashProperties name="TM4Cx">
		<partnum beginsWith="TM4C" />
		<partnum beginsWith="SC4C" />
	<FlashProperties name="TMS470MF03x">
		<partnum beginsWith="TMS470MF03" />
	<FlashProperties name="TMS470MF06x">
		<partnum beginsWith="TMS470MF06" />
	<FlashProperties name="TMS470MSF2x">
		<partnum beginsWith="TMS470MSF2" />
	<FlashProperties name="TMS570LS20x">
		<partnum beginsWith="TMS570LS20" />
	<FlashProperties name="TMS570LS10x">
		<partnum beginsWith="TMS570LS10" />
	<FlashProperties name="TMS570_RM48_3MB">
		<partnum beginsWith="TMS570LS31" />
		<partnum beginsWith="RM48L9" />
	<FlashProperties name="TMS570_RM48_2MB">
		<partnum beginsWith="TMS570LS21" />
		<partnum beginsWith="RM48L7" />
		<partnum beginsWith="RM48L5" />
	<FlashProperties name="TMS570_RM46_125MB">
		<partnum beginsWith="TMS570LS12" />
		<partnum beginsWith="RM46L8" />
	<FlashProperties name="TMS570_RM46_1MB">
		<partnum beginsWith="TMS570LS11" />
		<partnum beginsWith="RM46L4" />
	<FlashProperties name="TMS570_RM46_768KB">
		<partnum beginsWith="TMS570LS08" />
	<FlashProperties name="TMS570_RM44_1MB">
		<partnum beginsWith="TMS570LS09" />
		<partnum beginsWith="RM44L9" />
	<FlashProperties name="TMS570_RM44_768KB">
		<partnum beginsWith="TMS570LS07" />
		<partnum beginsWith="RM44L5" />
	<FlashProperties name="TMS570_RM42_384KB">
		<partnum beginsWith="TMS570LS04" />
		<partnum beginsWith="RM42L4" />
	<FlashProperties name="TMS570xC_RM57_4MB">
		<partnum beginsWith="TMS570LC4" />
		<partnum beginsWith="TMS570DC4" />
		<partnum beginsWith="RM57L8" />
		<partnum beginsWith="RM57D8" />
	<FlashProperties name="TMS570xC_RM57_3MB">
		<partnum beginsWith="TMS570LC3" />
		<partnum beginsWith="TMS570DC3" />
		<partnum beginsWith="RM57L6" />
		<partnum beginsWith="RM57D6" />
	<FlashProperties name="TMS570_RM41_128KB">
		<partnum beginsWith="TMS570LS02" />
		<partnum beginsWith="RM41L2" />
	<FlashProperties name="TMS570LS033x">
		<partnum beginsWith="TMS570LS03" />
	<FlashProperties name="TMS320F28004x_128KB">
		<partnum beginsWith="TMS320F280040" />
		<partnum beginsWith="TMS320F280041" />
		<partnum beginsWith="TMS320F280042" />
		<partnum beginsWith="F280040" />
		<partnum beginsWith="F280041" />
		<partnum beginsWith="F280042" />
	<FlashProperties name="TMS320F28004x_256KB">
		<partnum beginsWith="TMS320F28004" />
		<partnum beginsWith="F28004" />
	<FlashProperties name="TMS320F28002x_32KB">
		<partnum beginsWith="TMS320F280021" />
		<partnum beginsWith="F280021" />
	<FlashProperties name="TMS320F28002x_64KB">
		<partnum beginsWith="TMS320F280023" />
		<partnum beginsWith="TMS320F280022" />
		<partnum beginsWith="F280023" />
		<partnum beginsWith="F280022" />
	<FlashProperties name="TMS320F28002x_128KB">
		<partnum beginsWith="TMS320F28002" />
		<partnum beginsWith="F28002" />
	<FlashProperties name="TMS320F28003x_384KB">
		<partnum beginsWith="TMS320F280039" />
		<partnum beginsWith="TMS320F280038" />
	<FlashProperties name="TMS320F28003x_256KB">
		<partnum beginsWith="TMS320F280037" />
		<partnum beginsWith="TMS320F280036" />
	<FlashProperties name="TMS320F28003x_128KB">
		<partnum beginsWith="TMS320F280034" />
		<partnum beginsWith="TMS320F280033" />
	<FlashProperties name="TMS320F28001x">
		<partnum beginsWith="TMS320F28001" />
	<FlashProperties name="TMS320F2838x">
		<partnum beginsWith="TMS320F2838" />
		<partnum beginsWith="F2838" />
	<FlashProperties name="F28M35_512KB">
		<partnum beginsWith="F28M35H5" />
		<partnum beginsWith="F28M35M5" />
	<FlashProperties name="F28M35_256KB">
		<partnum beginsWith="F28M35" />
	<FlashProperties name="F28M36_C512KB_M1MB">
		<partnum beginsWith="F28M36P63" />
	<FlashProperties name="F28M36_C512KB_M512KB">
		<partnum beginsWith="F28M36" />
	<FlashProperties name="TMS320F28P65x_1280KB">
		<partnum beginsWith="TMS320F28P650DK" />
		<partnum beginsWith="TMS320F28P650SK" />
	<FlashProperties name="TMS320F28P650DHx_768KB">
		<partnum beginsWith="TMS320F28P650DH" />
		<partnum beginsWith="TMS320F28P659DH" />
	<FlashProperties name="TMS320F28P650SHx_768KB">
		<partnum beginsWith="TMS320F28P650SH" />
		<partnum beginsWith="TMS320F28P659SH" />

	<FlashProperties name="UCD3138064">
		<partnum beginsWith="UCD3138064" />
	<FlashProperties name="UCD3138A64">
		<partnum beginsWith="UCD3138A64" />
	<FlashProperties name="UCD3138128">
		<partnum beginsWith="UCD3138128" />
	<FlashProperties name="UCD3138">
		<partnum beginsWith="UCD3138" />
	<FlashProperties name="mmWave_Gen3">
		<partnum beginsWith="AWRL14" />
		<partnum beginsWith="IWRL64" />
	<FlashProperties name="AWR14xx">
		<partnum beginsWith="AWR14" />
		<partnum beginsWith="AWR12" />
		<partnum beginsWith="AWR22" />
		<partnum beginsWith="IWR14" />
		<partnum beginsWith="IWR12" />
	<FlashProperties name="AWR16xx">
		<partnum beginsWith="AWR16" />
		<partnum beginsWith="AWR18" />
		<partnum beginsWith="AWR64" />
		<partnum beginsWith="AWR68" />
		<partnum beginsWith="IWR16" />
		<partnum beginsWith="IWR18" />
		<partnum beginsWith="IWR68" />
	<FlashProperties name="AWR29xx">
		<partnum beginsWith="AWR29" />
	<FlashProperties name="MSPM0">
		<partnum beginsWith="MSPM0" />
	<FlashProperties name="MSP430">
		<partnum beginsWith="MSP430" />
		<partnum beginsWith="RF430" />
		<partnum beginsWith="CC430" />
		<partnum beginsWith="F20x*_G2x*x_G2x*x" />
		<partnum beginsWith="MSP432" msp432fet="true" />