.. _debug-getting-started-with-ccs-cc23xx:

Getting started with CCS debug interface
-----------------------------------------

This section describes the debug interface offered by |CCS|.

.. note::
    More extensive documentation is provided in the 
    `CCS Debug Environment Guide <https://software-dl.ti.com/ccs/esd/documents/users_guide/index_debug.html>`_.

Start a debug session
^^^^^^^^^^^^^^^^^^^^^

To start a debug session, click on the debug icon.
If enabled to do and required, this will trigger a software build.
It will also automatically download the binary on the |DEVICE| device.

.. note::
    The small arrow next to the debug button offers the possibility to modify
    the *Debug Configurations*.

If needed, make sure to select the proper process in the *Debug View*.

.. figure:: /debugging/resources/start_debug_session_cc2340.png
    :align: center

Reset the device while debugging
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TI recommends to use the default reset command (i.e. click on the 
|img_icon_reset_ccs| button or use the shortcut ``Ctrl+Shift+R``).
Using other reset commands may lead to unexpected device behavior.

.. |img_icon_reset_ccs| image:: /debugging/resources/icon_reset_ccs.png

Build and flash the device while debugging
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To rebuild the code and automatically flash the device during a debug session
press the build |img_icon_load_ccs| button. Then press "yes" in the dialog box
you can also click on the Reload Program |img_icon_reload_program_ccs| button (shortcut ``Ctrl+Alt+R``)

.. |img_icon_load_ccs| image:: /debugging/resources/icon_build_ccs.png
.. |img_icon_reload_program_ccs| image:: /debugging/resources/icon_reload_program_ccs.png