NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

GDB with MSP430 and CCSv6

From Texas Instruments Wiki
Jump to: navigation, search

Requirements[edit]

  • 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.

Installation[edit]

MSP Device Support[edit]

Check for updates and install the latest version of the MSP430 emupack.

GCC[edit]

You can install the GCC package from the App Center.

GDB Agent[edit]

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[edit]

Add the CDT update site to your list of update sites. Go to Help -> Install New Software. Click on the Add button and setup the site as shown below.
CDTUpdateSite.png

You will now see the new features that are available on this site. Select the one for GDB hardware debugging.
CDTGDBhwdebugfeatureselect.png

Select next and click through the installation steps as shown below. When finished it will prompt you to restart CCS, please do this.
CDTGDBhwdebugfeaturedescriptioninstall.png
CDTGDBhwdebugfeaturelicense.png
RestarttoInstallPrompt.png

Configuration[edit]

Debug Configuration[edit]

Click the down arrow beside the debug button and select Debug Configurations. This will open the debug configurations dialog.
BugButtonDropDownDebugConfig.png

On the left you will see the different types of debug sessions available. Select the one for GDB hardware debugging and then click the new configuration button at the top.
NewLaunchConfigGDB.png

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.
GDBprogramfilesettings.png

Next click on the Debugger tab. Go down to the button and click on the "select other" link.
Changelaunchertolegacy.png

Check the box to Use configuration specific settings and select to use Legacy GDB Hardware Debugging Launcher.
Legacylauncherselect.png

Now specify the path to GDB and the other options shown.
DebuggerSettingsGDB.png

GDB Agent Configuration[edit]

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.

Go to Window -> Customize Perspective
Customizeperspectivemenu.png

Select the "Command Groups Availability" tab. Then uncheck and check the "Launch" command group. Then click OK.
Launchcommandgroup.png

You should now see the external tools menu group on the toolbar. Click the down arrow beside the external tools button and select "External Tools Configurations".
Externaltoolsmenu.png

Now lets create a configuration for the GDB agent console. Select "Program" in the tree on the left and then click the New button.
Newlaunchconfigdialog.png

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.
Externaltoolgdbagentconsolesettings.png

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[edit]

  1. 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.
  2. Then go to the Debug drop down in CCS and select the Debug Configuration that you created for GDB.
  3. This will start the debug session, load the program to the target and, depending on the settings, be halted at main.
  4. At this point you can perform debug operations such as setting breakpoints, and stepping through code.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article GDB with MSP430 and CCSv6 here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article GDB with MSP430 and CCSv6 here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article GDB with MSP430 and CCSv6 here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article GDB with MSP430 and CCSv6 here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity