• Menu
  • Product
  • Email
  • PDF
  • Order now
  • Using GCC/GDB With SimpleLink CC26xx/CC13xx

    • SWRA446 February   2015 CC1310 , CC1310 , CC2620 , CC2620 , CC2630 , CC2630 , CC2640 , CC2640 , CC2640R2F , CC2640R2F , CC2640R2F-Q1 , CC2640R2F-Q1 , CC2650 , CC2650 , CC2650MODA , CC2650MODA

       

  • CONTENTS
  • SEARCH
  • Using GCC/GDB With SimpleLink CC26xx/CC13xx
  1.   Using GCC/GDB With SimpleLink CC26xx/CC13xx
    1.     Trademarks
    2. 1 Introduction
    3. 2 Prerequisites
      1. 2.1 Platforms
      2. 2.2 Hardware
      3. 2.3 Software
    4. 3 Hardware Setup
    5. 4 Software Installation Instructions
      1. 4.1 Java Runtime Environment
      2. 4.2 Eclipse IDE (Windows)
      3. 4.3 Eclipse IDE (Linux)
      4. 4.4 GNU Toolchain (Windows)
      5. 4.5 GNU Toolchain (Linux)
      6. 4.6 Build Tools for Windows
      7. 4.7 TI Emupack and GDB Server (Windows)
      8. 4.8 Flash Programmer (Windows)
      9. 4.9 Flash Programmer (Linux)
    6. 5 Build the Software Example
      1. 5.1 Import Example Project Into the IDE
      2. 5.2 Build the Software Example
    7. 6 Load Binary Image to Target
      1. 6.1 Configure Flash Programmer Tool (Windows)
      2. 6.2 Configure Flash Programmer Tool (Linux)
      3. 6.3 Load the Image to Target (Windows)
      4. 6.4 Load the Image to Target (Linux)
    8. 7 Debug the Software Example
      1. 7.1 Launch the GDB Server (Windows)
      2. 7.2 Launch the GDB Server (Linux)
      3. 7.3 Configure Eclipse Debugger
      4. 7.4 Running the Software Example From Debugger
    9. 8 References
  2. AMakefile
    1. A.1 Makedefs
    2. A.2 Makefile
  3. BLinker and Startup Files
    1. B.1 Linker File
    2. B.2 Startup Files
  4. IMPORTANT NOTICE
search No matches found.
  • Full reading width
    • Full reading width
    • Comfortable reading width
    • Expanded reading width
  • Card for each section
  • Card with all content

 

APPLICATION NOTE

Using GCC/GDB With SimpleLink CC26xx/CC13xx

Using GCC/GDB With SimpleLink™ CC26xx/CC13xx

This application report describes how to set up an open source software-based development environment for the SimpleLink CC26xx and CC13xx wireless MCUs using Eclipse as integrated development environment (IDE).

Project collateral and source code discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/swra446.

Trademarks

SimpleLink, Code Composer Studio, SmartRF are trademarks of Texas Instruments.

ARM, Cortex are registered trademarks of ARM Limited.

Linux Mint is a trademark of Linux Mark Institute.

Linux is a registered trademark of Linux Torvalds in the U.S. and other countries.

Windows is a registered trademark of Microsoft Corporation in the United States and.

All other trademarks are the property of their respective owners.

1 Introduction

The SimpleLink CC26xx and CC13xx wireless MCUs are optimized for ultra-low power, while providing fast and capable MCU systems to enable short processing times and high integration. The combination of an up-to 48-MHz ARM®Cortex®-M3 processing core, Flash memory, and a wide selection of peripherals makes the CC26xx/CC13xx device family ideal for single-chip implementation or network processor implementations of lower power RF nodes. For more information about the CC26xx/CC13xx family, see [1].

This document describes which software packages are necessary, and provides installation and configuration instructions for each. It also describes how to use this tool chain setup to debug a software example for a SimpleLink CC26xx device.

Section 2 and Section 3 list the software packages and hardware required for this tool chain setup. Installation procedures for the software packages are provided in Section 4. The next sections describe how to use the tool chain to build, program and debug a software example. Section 5 describes the process of building the project. Section 6 describes how to load the binary image to target and Section 7 describes how to debug the program. Section A gives a more detailed description of the makefile used to build the example project, while Section B gives a description of the linker and startup file used in the example project.

This setup has been tested on a Windows® 7 and on a Linux Mint™ machine.

Table 1. Abbreviations

CCS Code Composer Studio™
CDT C/C++ Development Tooling
EB Evaluation Board
EM Evaluation Module
GCC The GNU Compiler Collection
GDB The GNU Project Debugger
IDE Integrated Development Environment
JRE Java Runtime Environment

2 Prerequisites

2.1 Platforms

This tools setup has been tested on Windows 7 and on Linux Mint 12. Most of the setup instructions will be identical for these platforms. It is noted in the text in the cases where the instructions differ on Linux®.

2.2 Hardware

The following hardware pieces are required:

  • SmartRF06EB
  • A SimpleLink CC26xxEM
  • USB cable

The SmartRF06EB has an integrated XDS100v3 emulator. For more information about the hardware, see [2].

2.3 Software

This section describes the software packages that are required for going through this application report. Tools components, other than the below packages, might be used as well, for example, newer versions of the tools that have become available after this document was written. The below packages and versions are tested together during the writing of this document.

  • An IDE. For example, Eclipse and the following components:
    • Java Runtime Environment – JRE
    • http://java.com/en/download/index.jsp

    • Eclipse Luna 4.4.1
    • http://archive.eclipse.org/eclipse/downloads/drops4/R-4.4.1-201409250400/

    • CDT (C/C++ Development Tooling) version 8.5.0 for Eclipse Luna
    • http://www.eclipse.org/cdt/downloads.php

  • A GCC Compiler. For example:
    • GNU Tools for ARM Embedded Processors 4.8
    • https://launchpad.net/gcc-arm-embedded

  • Build tools for Windows. For example:
    • MinGW
    • http://www.mingw.org/

  • A GDB agent and a Flash programmer tool. For example:
    • For Windows: XDS100v3 EMUpack + GDB agent
    • http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package

    • For Windows: SmartRF™ Flash Programmer 2
    • http://www.ti.com/tool/flash-programmer

    • For Linux: CCS Uniflash Standalone Flash Tool
    • http://www.ti.com/tool/uniflash

  • Software example:
    • Blink LED software example for GCC (packaged with this document)

Download and installation instructions for each software package are provided in Section 4.

3 Hardware Setup

For instructions on how to configure the hardware, see [2].

4 Software Installation Instructions

4.1 Java Runtime Environment

The Eclipse IDE is dependent on the Java Runtime Environment (JRE) being installed on the machine. Note that both JRE and Eclipse must be downloaded for the same platform (the 64-bit version of Eclipse requires the 64-bit version of JRE). Make sure JRE is installed before performing installation of the Eclipse IDE. If not, it can be downloaded from http://java.com/en/download/index.jsp.

4.2 Eclipse IDE (Windows)

Follow these instructions to install Eclipse and CDT on a Windows platform.

  1. Download Eclipse from http://eclipse.org/downloads/index.php.
  2. Unzip the downloaded package.
  3. The Eclipse IDE can now be started by running the eclipse.exe file. If you are using Windows 7, make sure that Eclipse is run as administrator to allow for the new installations. Eclipse will ask for a folder to use for workspace location when it is started. If Eclipse reports that it cannot find the Java Runtime Environment, make sure that the installation path is added to your environment variables. This is done by going to Control Panel → System and Security → System → Advanced system settings. Append the path of the bin folder in the JRE installation to the PATH variable.
  4. Verify the installed versions of the package under Help → About Eclipse SDK.
  5. Verify that you use the correct version of the Java Runtime Environment. The version can be found under Window → Preferences → Java → Installed JREs.
  6. The following instructions describe how to install the CDT plugins:

  7. Navigate to Help → Install New Software (see Figure 1).
  8. eclipse_install_new_swra446.gifFigure 1. Eclipse - Install New Software (Windows)
  9. Type http://download.eclipse.org/tools/cdt/releases/8.5/ (or the address of the software repository for another version of CDT) in the field called 'Work with:'.
  10. Select both ‘CDT Main Features’ and ‘CDT Optional Features’ to install (see Figure 2).
  11. installing_CDT_swra446.gifFigure 2. Installing CDT
  12. Click ‘Next’ twice and accept the licence agreements. Click ‘Finish’ to install the CDT package.
  13. When finished, click Yes to restart Eclipse.
  14. Verify that the CDT components are correctly installed. Navigate to Help → About Eclipse SDK and click ‘Installation Details’. Make sure that the C/C++ Development Platform and the C/C++ GDB Hardware Debugging are both installed (see Figure 3).
  15. installation_details_swra446.gifFigure 3. Installation Details

4.3 Eclipse IDE (Linux)

Follow these instructions to install Eclipse and CDT on a Linux platform.

  1. Download Eclipse from http://eclipse.org/downloads/index.php. Choose the installer for your Linux platform.
  2. Extract the download package.
  3. The Eclipse IDE can now be started by running the binary file eclipse. Make sure that Eclipse is run with administrator privileges to allow for the new installations. Eclipse will ask for a folder to use for workspace location when it is started. If Eclipse reports that it cannot find the Java Runtime Environment, open the eclipse.ini file and add the following two lines direct under the ‘openFile’ statement:
  4. -vm <path to your JRE installation>/bin/java
  5. Verify the installed versions of the package under Help → About Eclipse SDK.
  6. Verify that you use the correct version of the Java Runtime Environment. This can be checked under Window → Preferences → Java → Installed JREs.
  7. The following instructions describe how to install the CDT plugins:

  8. Navigate to Help → Install New Software (see Figure 4).
  9. eclipse_install_new_software_linux.gifFigure 4. Eclipse - Install New Software (Linux)
  10. Type http://download.eclipse.org/tools/cdt/releases/8.5/ (or the address of the software repository for another version of CDT) in the field called 'Work with:'.
  11. If there is a problem with finding the repository site, this might be because of incorrect proxy settings on the system. These can be configured in the Eclipse IDE under Window → Preferences → General → Network Connections.
  12. An alternative is to download the CDT manually from http://www.eclipse.org/cdt/downloads.php. Choose the archive file called cdt-x.x.x.zip. Select Add → Archive… and browse to your downloaded archive file. Name it CDT and click OK (see Figure 5).

    installing_CDT_Linux_swra446.gifFigure 5. Installing CDT (Linux)
  13. Follow step 3 in Section 4.2. These final steps for Windows and Linux are equal.

4.4 GNU Toolchain (Windows)

GNU Tools for ARM Embedded Processors is a free package that includes the GNU compiler and linker tools as well as the GNU debugger. Perform the following steps for Windows installation:

  1. Download GNU Tools for ARM Embedded Processors. The package can be found on this site: https://launchpad.net/gcc-arm-embedded.
  2. Run the installer and follow the instructions. In the last step, make sure to select the checkbox 'Add path to environment variable'.
  3. Verify from the command prompt that the package is installed is updated correctly. This can be done by clicking Start → Run… . Type in cmd and click OK. In the command window, write:
  4. arm-none-eabi-gcc --version

    The expected output is shown in Figure 6. If the arm-none-eabi-gcc program is not found, check that the PATH variable is correctly set.

    sourcery_codebench_lite_windows_swra446.gifFigure 6. GNU Toolchain (Windows)

More information about this package can be found in [3].

4.5 GNU Toolchain (Linux)

Perform the following steps for the Linux installation of GNU Tools for ARM Embedded Processors:

  1. Download GNU Tools for ARM Embedded Processors. The package can be found on this site : https://launchpad.net/gcc-arm-embedded.
  2. Unpack the tarball to the install directory, with the following command:
  3. $ cd <install_dir> && tar xjf gcc-arm-none-eabi-*-yyyymmdd- linux.tar.bz2
  4. Add the installation path to the PATH variable with the following command:
  5. $ export PATH=$PATH:<install_dir>/gcc-arm-none-eabi-*/bin
  6. Check that the correct version is installed with the command:
  7. $ arm-none-eabi-gcc –v

    More information about this package can be found in [3].

4.6 Build Tools for Windows

If your development platform is Windows, an additional command line program, ‘make’, is required by the Eclipse external builder. One choice is to download the MinGW tool. Perform the following steps for installation:

  1. Download the MinGW setup tool from http://www.mingw.org/.
  2. Run the Setup. Choose default installation directory.
  3. Click Continue when the setup is finished to open the installation manager.
  4. In the Installation Manager, mark ‘All Packages’ in the left panel. Click on the checkboxes for the packages called mingw32-make and mingw32-gcc and select ‘mark for installation’.
  5. installing_mingw_windows.gifFigure 7. Installing MinGW (Windows)
  6. Choose Installation → Apply Changes and click the ‘Apply’ button.
  7. installing_mingw_windows_2.gifFigure 8. Installing MinGW (Windows)
  8. Finally, add the installation path (default: C:\MinGW\bin) to your environment variables. This is done by going to Control Panel → System and Security → System → Advanced system settings. Append the installation path to the PATH variable.

4.7 TI Emupack and GDB Server (Windows)

The following two steps are necessary only for Windows:

  1. Download the XDS Emulation Software Package from the following location: http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package.
  2. This includes drivers for the XDS emulators and the GDB server.

  3. Run the installer as an administrator. Select the typical installation and default installation directory.

4.8 Flash Programmer (Windows)

The following two steps describe the installation of the Flash programmer tool for Windows:

  1. Download SmartRF Flash Programmer 2 from the following location: http://www.ti.com/tool/flash-programmer.
  2. Unzip the downloaded file and run the installer.

 

Texas Instruments

© Copyright 1995-2025 Texas Instruments Incorporated. All rights reserved.
Submit documentation feedback | IMPORTANT NOTICE | Trademarks | Privacy policy | Cookie policy | Terms of use | Terms of sale