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

 

  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

Configure Eclipse Debugger

This section describes how to configure the Eclipse debugger.

  1. In the Project Explorer, right click blink_led and select Debug As → Debug Configurations… The Debug Configurations window will now be shown.
  2. Right click 'GDB Hardware Debugging' and select 'New'.
  3. Make sure that the settings in the 'Main' tab are configured as in Figure 22.
  4. GDB_hardware_debugging_swra446.gifFigure 22. GDB Hardware Debugging – Main Tab
  5. Select the 'Debugger' tab. Make sure the 'Use remote target' box is unchecked. In the GDB command field type in:
    1. Windows: arm-none-eabi-gdb.exe
    2. Linux: arm-none-eabi-gdb
    3. NOTE

      For Linux: In some cases an absolute path to gdb must be used for Eclipse to be able to find it. Use the full path to arm-none-eabi-gdb. This program is found in the bin folder where GNU Tools for Arm Embedded Processors is installed.

  6. At the bottom of the window where the text 'Using GDB (DSF) Hardware Debugging Launcher' is shown, press 'Select other….Mark the checkbox 'Use configuration specific settings' and select the 'Legacy GDB Hardware Debugging Launcher'.
  7. Select the 'Debugger' tab again. The settings should look like the ones shown in Figure 23.
  8. GDB_hardware_debugging_2_swra446.gifFigure 23. GDB Hardware Debugging – Debugger Tab
  9. Select the ‘Startup’ tab and configure the same setting as shown in Figure 24. Make sure that Load image is unchecked, and that the following commands are added in the Initialization Commands window:
  10. mem 0x00 0x20000 ro 32 nocache mem 0x10000000 0x10020000 ro 32 nocache mem 0x20000000 0x20005000 rw 32 nocache mem 0x40000000 0x400E1028 rw 32 nocache mem 0xE000E000 0xE000F000 rw 32 nocache target remote localhost:55000

    The mem command defines the specified memory regions with different attributes.

    ro: read only
    rw: read write
    32: use 32 bit memory access
    nocache: disable GDB from caching target memory

    The target remote localhost:55000 will make the GDB to connect to the gdbserver on the local pc using port 55000.

    GDB_hardware_debugging_3_swra446.gifFigure 24. GDB Hardware Debugging – Startup Tab
  11. Click 'Apply' and close the 'Debug Configurations' window.