GDB with MSP430 and CCSv6
- CCSv6.0.0 or later
- CDT GDB Hardware Debug Package
- MSP430 emupack 6.0.1 or later
- MSP430 Redhat GCC
In order to be able to use the CCS GUI for things like setting/removing breakpoints, the project should be an Eclipse C/C++ project rather than a CCS project. The steps to create a C/C++ project using MSP GCC toolchain is documented in this wiki page.
MSP Device Support
Check for updates and install the latest version of the MSP430 emupack.
You can install the GCC package from the App Center.
Obtain the GDB Agent Installation package and copy the GDB agent console and msp430.dat into your /ccsv6/ccs_base/DebugServer/drivers folder
GDB Support for CCS
You need to specify the location of the target program that will be loaded. You can also specify the project to associate this configuration with. This is useful as it helps the debugger find source files. In the case below I have specified the program as relative to the project by clicking the Search Project button after specifying the project being used.
GDB Agent Configuration
GDB talks to a GDB agent or proxy. This agent needs to be started inorder for GDB to be able get access to the target device. In this section we show how to setup an "external tool" in CCS so that you can easily launch the agent using the GUI.
Fill in the Name, full path of the GDB agent console (where you installed it), working directory (same path) and specify msp430.dat as the argument (this file should be in the same folder). Then click Apply.
Now if you go back to the down arrow beside the external tools button you should be able to launch the GDB Agent Console. If you prefer to use the Agent GUI you can set it up in the same way.
Launching a debug session
- Go to the external tools drop down in CCS and select your entry for the GDB Agent Console (if it is not already running). This should start up the GDB Agent and it should be "waiting" or "listening" at a specific port.
- Then go to the Debug drop down in CCS and select the Debug Configuration that you created for GDB.
- This will start the debug session, load the program to the target and, depending on the settings, be halted at main.
- At this point you can perform debug operations such as setting breakpoints, and stepping through code.