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.

MSPM0G3107: [XDS110] [Uniflash] [DSLite.bat] : Error when trying to massErase with command line "Failed: Timed out waiting for target to halt"

Part Number: MSPM0G3107
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hello,

I need to use command line to perform following operation in that order: Mass Erase of the tagert => Load image

But the load image only seem to work without MassErase operation using DSLite:

C:\ti\uniflash_9.1.0>DSLite.bat --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml -a MassErase -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex
Executing the following command:
> "C:\ti\uniflash_9.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" flash --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml -a MassErase -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex

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

DSLite version 20.1.0.3671
Configuring Debugger (may take a few minutes on first launch)...
        Initializing Register Database...
        Initializing: CS_DAP_0
        Executing Startup Scripts: CS_DAP_0
        Initializing: CORTEX_M0P
        Executing Startup Scripts: CORTEX_M0P
        Initializing: SEC_AP
        Executing Startup Scripts: SEC_AP
Connecting...
CORTEX_M0P: GEL Output: Memory Map Initialization Complete
Loading Program: C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex
        Preparing ...
        0 of 131072 at 0x0
        32752 of 131072 at 0x0: 24%
        65504 of 131072 at 0x0: 49%
        98256 of 131072 at 0x0: 74%
        131008 of 131072 at 0x0: 99%
        Finished: 99%
        Setting PC to entry point.: 99%
Failed: Timed out waiting for target to halt

C:\ti\uniflash_9.1.0>DSLite.bat --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml -b MassErase -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex
Executing the following command:
> "C:\ti\uniflash_9.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" flash --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml -b MassErase -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex

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

DSLite version 20.1.0.3671
Configuring Debugger (may take a few minutes on first launch)...
        Initializing Register Database...
        Initializing: CS_DAP_0
        Executing Startup Scripts: CS_DAP_0
        Initializing: CORTEX_M0P
        Executing Startup Scripts: CORTEX_M0P
        Initializing: SEC_AP
        Executing Startup Scripts: SEC_AP
Connecting...
CORTEX_M0P: GEL Output: Memory Map Initialization Complete
Failed: Timed out waiting for target to halt

C:\ti\uniflash_9.1.0>
C:\ti\uniflash_9.1.0>DSLite.bat --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml  -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex
Executing the following command:
> "C:\ti\uniflash_9.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\DSLite" flash --config=C:\Git\rdu_swqt\SWQT\Flash\MSPM0G3107.ccxml  -e -f  C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex

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

DSLite version 20.1.0.3671
Configuring Debugger (may take a few minutes on first launch)...
        Initializing Register Database...
        Initializing: CS_DAP_0
        Executing Startup Scripts: CS_DAP_0
        Initializing: CORTEX_M0P
        Executing Startup Scripts: CORTEX_M0P
        Initializing: SEC_AP
        Executing Startup Scripts: SEC_AP
Connecting...
CORTEX_M0P: GEL Output: Memory Map Initialization Complete
Loading Program: C:\RDU_SW\release_1.2.1.0\Rdu_MainSW_ff_release_1.2.1.0_25-02-25_17h04_ebee1a3_clean.hex
        Preparing ...
        0 of 131072 at 0x0
        32752 of 131072 at 0x0: 24%
        65504 of 131072 at 0x0: 49%
        98256 of 131072 at 0x0: 74%
        131008 of 131072 at 0x0: 99%
        Finished: 99%
        Setting PC to entry point.: 99%
Success

The different Mass Erase Operation seem to work fine when using UniFlash

[27/03/2025, 14:48:13] [INFO] CS_DAP_0: GEL Output: Initiating Device Mass Erase
[27/03/2025, 14:48:13] [INFO] CS_DAP_0: GEL Output: Attempting CS_DAP connection
[27/03/2025, 14:48:14] [INFO] CS_DAP_0: GEL Output: Attempting SEC_AP connection
[27/03/2025, 14:48:14] [INFO] CS_DAP_0: GEL Output: Command Sent
[27/03/2025, 14:48:15] [INFO] CS_DAP_0: GEL Output: Start hardware Reset using NRST
[27/03/2025, 14:48:15] [INFO] CS_DAP_0: GEL Output: Initiating BOOTRST Board Reset
[27/03/2025, 14:48:15] [INFO] CS_DAP_0: GEL Output: Reset line asserted
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: Reset line de-asserted
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: Board Reset Complete
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: Reset done
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: SEC_AP Disconnect
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: SEC_AP Reconnect
[27/03/2025, 14:48:16] [INFO] CS_DAP_0: GEL Output: Command execution completed.
[27/03/2025, 14:48:16] [INFO] CORTEX_M0P: GEL Output: Mass Erase executed. Please terminate debug session, power-cycle and restart debug session.
[27/03/2025, 14:48:42] [INFO] CS_DAP_0: GEL Output: Initiating Device Factory Reset
[27/03/2025, 14:48:42] [INFO] CS_DAP_0: GEL Output: Command Sent
[27/03/2025, 14:48:43] [INFO] CS_DAP_0: GEL Output: Start hardware Reset using NRST
[27/03/2025, 14:48:43] [INFO] CS_DAP_0: GEL Output: Initiating BOOTRST Board Reset
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: Reset line asserted
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: Reset line de-asserted
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: Board Reset Complete
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: Reset done
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: SEC_AP Disconnect
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: SEC_AP Reconnect
[27/03/2025, 14:48:44] [INFO] CS_DAP_0: GEL Output: Command execution completed.
[27/03/2025, 14:48:44] [INFO] CORTEX_M0P: GEL Output: Factory Reset executed. Please terminate debug session, power-cycle and restart debug session.

What coul be the cause?

  • Hello Christophe,

    If code loading can be successful, the Flash erase must have been completed. So I guess that maybe when you operate code loading command in DSLite, the Flash erase (mass erase to erase all Flash sector by default except for NONMAIN) will be operated firstly. I think you can choose to use Uniflash to do what you want. Why did you choose to use DSLite to do development? If you must use DSLite, I can try to transmit your post to SDTO team, and ask for some commons for our SDTO team colleague.

    Best Regards,

    Janz Bai 

  • Hello Janz Bai,

    Sorry the log is probably not the best example, for now the software that I am testing does not need a mass erase to be flashed but it is an evolution that will be implemented soon.

    I am already using Uniflash for manual test but I am also running automated test with Jenkins. And I need to be able to perform a MassErase and flash the last SW version before performing any test. My tests are writen in Python and until now I was using DSlite for flashing. If there is another solution using Python for mass erase then flashing I can use something else.

    Best regards,
    Christophe DUVAL

  • Christophe,

    I'm not sure if the standalone MassErase operation is implemented correctly in the MSPM0, which might be why you are getting the "Timed out waiting for target to halt" error.

    But the flash is erased at the beginning of a program load operation, based on the setting in the Erase Configuration section. But default, it "Erase MAIN memory only", but can be configure to erase other sections as well. Would that fit the requirements you need in your test framework?

    Thanks,

    Ricky