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.

Using Keil MDK-ARM with CC13xx/CC26xx

From Texas Instruments Wiki
Jump to: navigation, search

This article describes how to get device and debug support for CC13xx and CC26xx devices in Keil MDK-ARM using Segger J-Link.

Supported debuggers and devices[edit]

The following debug probes are supported:

  • Segger J-Link

The following devices are supported:

  • CC2650F128, CC2640F128, CC2630F128, CC2620F128
  • CC1310F128, CC1310F64, CC1310F32

Hardware and software[edit]

The steps described in this article are tested using the following hardware and software components

  • SmartRF06EB + CC2650EM-7ID and CC1310EM
  • Keil MDK-ARM 5.14 Pro
  • Segger J-Link debug probe (driver version 6.00g or later recommended)
  • CC26xxWare v2.22.00.16101
  • CC13xx and CC26xx Device Family Pack v0.0.2

It is in the following assumed that you already have MDK-ARM installed on your computer.

Installing/updating J-Link driver[edit]

CC26xx and CC13xx support requires J-Link driver version 6.00g or higher. The latest drivers are recommended and can be downloaded from here.

  1. Run the J-Link installer as administrator
  2. During installation you should be prompted to update existing J-Link DLLs on your system, make sure you select the J-Link DLL in your MDK-ARM installation.

If you are not prompted to update DLL during installation: Make sure you have MDK-ARM installed. The Segger DLL Updater can be found in the SEGGER folder of your Start Menu.

Installing CC13xx/CC26xx Device Family Pack[edit]

This section describes the steps to install the CC13xx/CC26xx Device Family Pack into MDK-ARM v5.

  1. Download CC13xx/CC26xx Device Family Pack: File:MDKARM-DFP-TexasInstruments.CC13xxCC26xx.0.0.2.zip.
  2. Open MDK-ARM
  3. Open the Pack installer (Project > Manage > Pack Installer...)
  4. In the Pack installer, select File > Import... and browse to the CC13xx/CC26xx Device Family Pack
  5. You should now be able to see CC26xx and CC13xx devices in the "Devices" tab
  6. Close the Pack installer and return to MDK-ARM
  7. If MDK-ARM prompts to update device definitions, click yes

Note: CC13xx and CC26xx devices require the Customer configuration area (CCFG) to be correctly set up for the device to boot. The following sections explain how to create an empty MDK-ARM project.

Create µVision project for CC26xx[edit]

This section describes how to create a new project in MDK-ARM with CC2650F128 as device.

Prerequisites

  • Download CC26xxWare 2.22.00.16101 and extract it to e.g. C:\ti\cc26xxware_2_22_00_16101

In MDK-ARM, go to Project > New µVision project... to create a new project.

Choose a location and name for your µVision project file. Click Save.

The Select Device dialog appears. Select CC2650F128 as your device and click OK.

CC26xx-jlink-mdkarm-select-device.jpg


The Manage Run-time Environment dialog appears. Don't select anything, just click OK.

Add necessary files[edit]

Create empty main.c
In your project, expand the "Target 1" folder.

  • Right click "Source Group 1" and select "Add New Item to Group 'Source Group 1'...".
    • Select C File (.c)
    • Specify "main.c" as name
    • Click Add

Add the following content to main.c file and save the changes (Ctrl + S):

#include <stdint.h>

int main(void)
{
    while(1);
}
 

Add startup file and required CC26xxWare files

  • Right click "Source Group 1" and select "Add Existing item to Group 'Source Group 1'...".
  • In the appearing dialog, browse and add the following folders (make sure you show "All files")
    • Select <cc26xxware_dir>\startup_files\startup_keil.s and click Add
    • Select <cc26xxware_dir>\startup_files\ccfg.c and click Add
    • Select <cc26xxware_dir>\driverlib\bin\keil\driverlib.lib and click Add
  • Close the dialog


Configure project options[edit]

Right click "Target 1" and select "Options for Target 'Target 1'..." to open the configuration dialog.

Add CC26xxWare to project include path

  1. Go to the C/C++ tab
  2. In the Include path field, add the CC26xxWare installation directory
    1. The include path should specify the folder containing the 'driverlib' and 'inc' folders, e.g. "C:\ti\cc26xxware_2_22_00_16101".
    2. Multiple include paths can be separated by semicolon
  3. It is recommended to enable the "C99 Mode" checkbox

Use scatter load file
To correctly place the CCFG area (in ccfg.c), the scatter load file included in CC13xx/CC26xx Device Family Pack should be used.

  1. Go to the Linker tab
  2. Uncheck "Use Memory Layout from Target Dialog"
  3. Select scatter file by clicking "..."
  4. Browse to <cc26xxware_dir>\linker_files\cc26x0f128.sct and click Open.
    Note: If you are using CC26xxWare 2.20.06.14829 or older: Use the scatter file included in the CC13xx/CC26xx Device Family pack: <mdk_arm_dir>\ARM\Pack\TexasInstruments\CC13xxCC26xx\<version>\Device\Linker\cc26x0f128.sct

Click OK to close the Options dialog.


Build the project[edit]

In MDK-ARM, build the project by selecting Project > Build target.

You may get some warning messages. This is expected and will be fixed in future versions of CC26xxWare.

Configure Segger J-Link as debugger[edit]

This section describes how to configure your µVision project to use Segger J-Link as debugger.

1. In your MDK-ARM project, open the target options (e.g. Project > Options for Target 1 'Target 1'...).

2. Go to the "Utilities" tab and uncheck "Update Target before debugging".

CC26xx-jlink-mdkarm-utilities.jpg

3. Go to the "Debug" tab and select "J-LINK / J-TRACE Cortex" before clicking the Settings" button

4. In the Driver setup window, enable the Download options as shown below. Here you can also see the Segger J-Link debug probe driver version (if the probe is plugged into your computer).

CC26xx-jlink-mdkarm-debug-settings.jpg

5. Close the two dialogs by clicking OK twice.

You can now debug your target by selecting Debug > Start/Stop Debug Session from the menu.

CC26xx-jlink-mdkarm-active-debug.jpg


Known issues[edit]

  • Earlier versions of the Segger J-Link did not work reliable when low power modes were used. This has been fixed, and we recommend using version 6.00g or later of the drivers. Get the latest version here.


CC13xx/CC26xx Device Support Pack Versions[edit]

This section lists the available versions of the CC13xx/CC26xx Device Support Pack versions.

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 Using Keil MDK-ARM with CC13xx/CC26xx 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 Using Keil MDK-ARM with CC13xx/CC26xx here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Using Keil MDK-ARM with CC13xx/CC26xx 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