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.

CC2642R-Q1: UniFlash CLI EraseSectors format

Part Number: CC2642R-Q1
Other Parts Discussed in Thread: UNIFLASH, CC2642R

What is the command line format for erasing certain sectors of flash memory using UniFlash CLI?

This is not mentioned at https://software-dl.ti.com/ccs/esd/uniflash/docs/v8_0/uniflash_quick_start_guide.html#command-line-interface

However, EraseSectors is an available option:

$ uniflash -c ~/Documents/cc2642r.ccxml --list-ops
Executing the following command:
> /home/ksivasambu/ti/uniflash_7.0.0/deskdb/content/TICloudAgent/linux/ccs_base/DebugServer/bin/DSLite flash -c /home/ksivasambu/Documents/cc2642r.ccxml --list-ops

For more details and examples, please refer to the UniFlash Quick Start guide.

Cortex_M4_0: GEL Output: Memory Map Initialization Complete.

--- Available Flash Operations ---
Erase, EraseSectors, ReadPriBle, ReadSecBle, WriteSecBle, ReadPriIeee, ReadSecIeee, WriteSecIeee, BlankCheck

  • Hi Karthikeyan,

    Use the -S/--list-settings option with a .* argument to show all available settings

    --- Settings ---
    - ResetOnRestart = false
    - RestartOnSymbolLoad = false
    - ClearBreakpointsOnLoad = true
    - AddCEXITbreakpointAfterLoad = true
    - AddCIOBreakpointAfterLoad = true
    - AddSemiHostingBreakpointAfterLoad = true
    - VerifyAfterProgramLoad = Fast verification
            Allowed Values:
            0. Full verification
            1. Fast verification
            2. No verification
    - HaltOnConnect = true
    - AutoResetOnConnect = false
    - AutoConnectIfChildConnects = true
    - DisableIntWhileAsmStepping = true
    - DisableIntWhileSrcStepping = false
    - DisableIntWhileRunning = false
    - UseLegacyStopMode = false
    - AllowInterruptsWhenHalted = false
    - PoliteRealtimeMode = true
    - AutoRunToLabelName = main
    - AutoRunToLabelOnRestart = false
    - AutoRunToLabelOnReset = false
    - ConnectOnStartup = false
    - EnableInstalledBreakpoint = false
    - IgnoreSoftLaunchFailures = true
    - PreventStepIntoAsm = true
    - LowPowerRunMode = false
    - KeepDebugPoweredAtDisconnect = true
    - CIOTimestamp = false
    - EnableSoftwareBreakpoints = true
    - FileIODefaultDirectory =
    - SyncBreakpointsAndSymbols = Synchronize breakpoints and symbols (with like cores), as well as execution
            Allowed Values:
            0. Synchronize execution only
            1. Synchronize breakpoints and symbols (with like cores), as well as execution
    - ModuleDebuggingEnabled = Never
            Allowed Values:
            0. Never
            1. When modules are loaded and unloaded (intrusive on target execution, and requires a patched kernel)
            2. Whenever halted in the module load/unload routines (you must manually set breakpoints in the appropriate routines for this to work)
    - ModuleNameList =
    - ModuleSearchPath =
    - FlashVerboseMode = false
    - FlashEraseSetting = Necessary Sectors Only (Retain untouched content within sector)
            Allowed Values:
            0. All Unprotected Sectors
            1. Necessary Sectors Only
            2. Necessary Sectors Only (Retain untouched content within sector)
            3. Specific Sectors
            4. Do not erase sectors (program load only)
    - ProgramLoadEraseSpecificInfo =
    - ProgramLoadEraseSpecificText =
    - CrcVerify = true
    - FlashPageToggle = false
    - FlashPageText =
    - FlashPages = 0-5,8
    - FlashPagesFilledWith = false
    - FlashPagesFilledWithValue = 0x
    - KeepCcfgSetting = false
    - DisableBootloader = false
    - DisableCpuDap = false
    - WriteProtectionToggle = false
    - WriteProtectionText =
    - EraseActionChoice = Erase entire flash (You must reconnect to the target afterwards)
            Allowed Values:
            0. Erase entire flash (You must reconnect to the target afterwards)
            1. Erase specific flash sectors
    - StandaloneEraseSpecificText = 0-5,8
    - RetainBleSecondaryAddr = false
    - OverrideBleSecondaryAddr = false
    - DeviceBleSecondary = --
    - RetainIeeeSecondaryAddr = false
    - OverrideIeeeSecondaryAddr = false
    - DeviceIeeeSecondary = --

    Of these, EraseActionChoice and StandaloneEraseSpecificText should allow you to specify the flash pages you want to erase.  You can then use the -b/--before option with the EraseSectors argument to carry out the instruction.  Here is a relevant E2E thread: https://e2e.ti.com/f/1/t/752772 

    Regards,
    Ryan