Connect the debugger to a running target

Connecting the debugger to a target can help when you want to see the status of your target after it has been running for several hours, or even days; or if you cannot reproduce a crash with the debugger attached. Once the debugger connected to the target, all the usual functionalities (break points, step-by-step, variable view, memory view…) are available.

This step-by-step guide will help you to configure CCS Theia in order to connect to a running target

  1. While the CC23xx or CC27xx is running the desired project, open CCS Theia.

  2. Go to the Debug view by clicking on the Debug icon on the left side bar.

  3. Click on the gear icon to open the launch.json file.

    ../_images/open_launch_json.png
  4. In the configurations array, add a new configuration object as shown below.

    ../_images/load_symbols_only_theia.png
  5. [Optional] If you would like to prevent CCS from halting the program, Right-click on the project and select Properties. In the Properties window, select Debugger | Connection options and uncheck Halt the target on a connect.

    ../_images/halt_target_on_connect.png
  6. At this point, you are all set. To connect to the running target, select the newly created configuration in the Debug view and click on the green play button.

If using CCS Eclipse, connecting to a running target will be slightly different

  1. While the CC23xx or CC27xx is running the desired project, open CCS Eclipse.

  2. Open the Target Configurations window by click on View → Target Configurations.

  3. In the Target Configurations window, expand the Projects folder.

  4. Expand your project within the Projects folder inside the Target Configurations window.

  5. Expand the targetConfigs folder.

  6. Right click on CC2340R5.ccxml and click on Launch Selected Configuration

    ../_images/cc23xx_target_configuration_launch.jpg
  7. After a few seconds, CCS will connect to the target and the core will be visible in the Debug window.

  8. Right click on the core and select Connect Target

    ../_images/cc23xx_core_connect_target.jpg
  9. Click on Run → Load → Load Symbols…

  10. Click on Browse Project.

  11. Select your project’s out file and press OK.

  12. Press OK on Load Symbols window.

  13. At this point you are connected to the target and should see where in the project the target is currently located.