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.

MSPM0G3507: Unable to Debug after Flashing: There is already a Code Composer debug session running

Part Number: MSPM0G3507
Other Parts Discussed in Thread: MSPM0-SDK

Tool/software:

### Problem Description

On the local CCS-Theia, I can only program once, and subsequent debugging attempts fail. If I click debug a second time, an error message appears: `There is already a Code Composer debug session running.`

However, everything works fine on [CCS Cloud](https://dev.ti.com/ide), which is very strange.

### Environment

- Microcontroller: MSPM0-G3507
- Operating System: Ubuntu-22.04
- CCS-Theia Version: 1.4.1.00001_linux-x64
- Emulator: XDS110
- MSPM0-SDK: 2_01_00_03
- Compiler: TI Clang v3.2.2.LTS

The basic environment is shown below:
![env](./img/env.png)

### Specific Error and Process

Importing the sample project as shown below:

![project](./img/project.png)

After clicking debug for the first time, it seems to program successfully, but debugging does not seem to run properly.

![problem0](./img/problem0.png)

Ending the debug session results in the error: `Request 2 cancelled on connection close`

![problem1](./img/problem1.png)

Clicking debug again produces the following error:
`There is already a Code Composer debug session running.`

![problem2](./img/problem2.png)

Restarting CCS-Theia has no effect, and the issue repeats itself.

However, on CCS Cloud, I can successfully program and debug, although the process is slower.
![CCS-Cloud](./img/CCS-Cloud.png)

In fact, I found similar issues on TI's Chinese forum, but there were few responses:


[mspm0g3507-debug-there-is-already-a-code-composer-debug-session-running](e2echina.ti.com/.../mspm0g3507-debug-there-is-already-a-code-composer-debug-session-running)

### Attempted Solutions

None have had a significant effect.

- Restarted CCS-Theia
- Restarted the computer
- Reinstalled CCS-Theia

### Potential Issues

When I first downloaded CCS-Theia, I ran `ccstheia141/ccs/install_scripts/install_drivers.sh` only after CCS-Theia was installed and the project was compiled.

I tried deleting CCS-Theia and running `install_drivers.sh` first, as well as `sudo apt install libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo` to reinstall it, but I cannot guarantee a completely clean deletion.

I also tried using the `xds110` program in `ccstheia141/ccs/ccs_base/common/uscif/xds110` to reprogram `firmware_3.0.0.29.bin`, but it did not help.

How can this issue be resolved? Any help would be greatly appreciated!
  • Hello,


    - Microcontroller: MSPM0-G3507
    - Operating System: Ubuntu-22.04
    - CCS-Theia Version: 1.4.1.00001_linux-x64
    - Emulator: XDS110
    - MSPM0-SDK: 2_01_00_03
    - Compiler: TI Clang v3.2.2.LTS

    I used the same exact environment and the same SDK example. My only difference was that I used CCS Theia 1.4.0 instead of 1.4.1.

    Everything worked fine for me

    After clicking debug for the first time,

    Where exactly did you click debug? There are several places to do it.

    ut debugging does not seem to run properly.

    In your screenshot, I see the call stack at 0x1B4. Then entry point of main should be 0xC0 and if the program loaded correctly and auto-ran to main, you should be at this location

    Ending the debug session results in the error: `Request 2 cancelled on connection close`

    You press the red square button for this, correct?

    It looks like in your environment the program wasn't loaded correctly. After the debug session starts, can you explicitly go to "Run -> Load -> Load Program" and explicitly load your program?

    Thanks

    ki

  • Hello, 

    Can you try to open the launch.json by clicking on the gear icon in the debug view toolbar and delete the launch configurations inside the JSON array?

    Patrick

  • Hello,

    Thanks for your reply!

    Where exactly did you click debug? There are several places to do it.

    "Run -> Debug Project"

    You press the red square button for this, correct?

    correct

    can you explicitly go to "Run -> Load -> Load Program" and explicitly load your program?

    I tried,here is the screenshot:

    I chose a file with the .out suffix (not sure if this is the correct way to load it).

    And I don't know why the call stack changed to 0x1BA

    My only difference was that I used CCS Theia 1.4.0 instead of 1.4.1.

    I also tried version 1.4.0, but the problem still exists.

    Thank you for your help!

  • Hello,

    Thanks for your reply!

    This is the content of launch.json. I tried to delete the launch configurations and regenerate, but the problem still exists.

    Thank you for your help!

  • I reinstalled my Ubuntu system, and on this clean system, I followed the steps at https://software-dl.ti.com/ccs/esd/documents/ccs_theia_linux_host_support.html one by one for the installation. I can now debug normally. The previous system might have had some strange problems.

    Thank you all for the help!

  • Glad to hear the issue is resolved! Hopefully a clean environment will prevent further issues.

    ki