This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Segger Support under CCS 6.1.1

Other Parts Discussed in Thread: SEGGER, CC2650, AM3352

I believe I have been able to get everything setup correctly to use a Segger J-Link with Code Composer Studio. I am attempting to work with a CC2650 target.

Right now, I am attempting to use an unlicensed version of CCS. Do I need a licensed version to use a Segger? It does give me a message that a license cannot be acquired, but it is not clear to me why I would need a license.

The other part is that I get a bunch of error messages in console output when it starts debugging:

Cortex_M3_0: GEL Output: Memory Map Initialization Complete.
Cortex_M3_0: GEL: Error while executing StartUp( 6, 1, 0, 1349 ): The reset Board Reset does not exist
at GEL_AdvancedReset("Board Reset") [cc26xx.gel:37]
at StartUp(6, 1, 0, 1349)
Cortex_M3_0: Trouble Reading Register <Unknown>: No mapped register was found for 1
Cortex_M3_0: Error occurred during flash operation: Target failed to read unknown register
Cortex_M3_0: GEL: Error calling OnPreFileLoaded(): Cannot find the target path name: <parent>

However, when I do debug, it does manage to breakpoint on main and until the "License cannot be acquired" window pops up I am able to debug.

  • Andrew McGuire27 said:
    Do I need a licensed version to use a Segger? It does give me a message that a license cannot be acquired, but it is not clear to me why I would need a license.

    With CCS 6.1.1 confirm that a license is required to use a Segger J-Link. If I debug using Segger J-Link with a full license can debug OK. If I try and debug using Segger J-Link with a free license the program is downloaded and stops at main, but after a few seconds I get the following, and the debugging session is terminated when click OK:

    Andrew McGuire27 said:
    The other part is that I get a bunch of error messages in console output when it starts debugging:

    While I don't have a CC2650, I have noticed that with CCS 6.1.1 and J-Link support v0.1.0.4 on a AM3352 device the Segger J-Link doesn't support a "System Reset". Therefore, based upon the GEL errors you reported don't think the CCS Segger J-Link support currently supports the "Board Reset" in the CC2650.

    Also, as noted by http://processors.wiki.ti.com/index.php/J-Link_Emulator_Support the Segger J-Link is "is not supported/tested with CCSv6.x.". What this means if you find a problem with the CCS Segger J-Link support, e.g. the debugger crashes, there is no support.

    [I have found the CCS Segger J-Link support crashes CCS on some targets]

    Other threads said TI is working with Segger to add impoved/full J-Link support to CCS, but I don't know when that is planned.

  • Hello,
    SEGGER has stared supporting CCSv6:
    www.segger.com/ti-code-composer-studio.html

    However there is a known issue with the cc26xx gel file when used with J-link that causes the errors mentioned above. Basically some calls made in the gel file are specific to XDS class emulators and not supported by J-link. This issue is currently being investigated and worked on.

    ki
  • And as Chester already mentioned, you need a full license to use J-link with CCS
  • Ki-Soo Lee said:
    SEGGER has stared supporting CCSv6:
    www.segger.com/ti-code-composer-studio.html

    Thanks for the information, I wasn't aware that Segger have started supporting CCSv6. I note that the http://processors.wiki.ti.com/index.php/J-Link_Emulator_Support Wiki page has been updated to point to Segger web site for the CCS J-Link installer for Windows. However, at the top of the Wiki page there is still the statement "IMPORTANT! Note that Jlink is not supported/tested with CCSv6.x.". Is it still true that J-Link is not supported/tested with CCS6, or should the Wiki page say J-Link is now supported?

    Ki-Soo Lee said:
    Basically some calls made in the gel file are specific to XDS class emulators and not supported by J-link.

    Using Segger J-Link support v5.3.2 with CCS v6.1.1 for a AM3352 I also note that the J-Link doesn't support the ICEPick. While ICEPick isn't used to run code, I had been using the ICEPick to execute the following GEL file with other XDS class emulators:

    // @file AM3352_icepick.gel
    // @date 13 Aug 2015
    // @author Chester Gillon
    // @brief GEL file for the IcePick in the AM3352 SOM
    // @details Upon connection forces the Cortex-A8 and its peripherals to the reset state,
    //          so the debugger can connect regardless of the current state.
    
    OnTargetConnect ()
    {
        /* Enable wait-in-reset for the Cortex-A8, so that after a system reset the boot ROM
         * can't start to load a program.
         * 
         * "CortxA8" is mis-spelt to match the desc in
         * <ccs_install_directory>/ccsv6/ccs_base/common/targetdb/devices/AM3352.xml */
        GEL_EvalOnTarget ("CortxA8", "GEL_SetWaitInResetMode(1)");
    
        /* Cause the IcePick to assert a System Reset */
        GEL_Reset ();
    }

    When using Segger J-Link support the target configuration file still allows a GEL initialization script to be specified for the ICEPick in the AM3352. However, when starting a debugger session the ICEPick GEL initialization script is not executed.

    Could the Segger J-Link support be updated to allow GEL files to be run on the ICEPick?

  • Chester Gillon said:
    However, at the top of the Wiki page there is still the statement "IMPORTANT! Note that Jlink is not supported/tested with CCSv6.x.". Is it still true that J-Link is not supported/tested with CCS6, or should the Wiki page say J-Link is now supported?

    Thanks for reminding me about that wiki. It needs to be updated. Segger is officially supporting J-link with CCSv6.

    Chester Gillon said:
    Using Segger J-Link support v5.3.2 with CCS v6.1.1 for a AM3352 I also note that the J-Link doesn't support the ICEPick.

    Chester Gillon said:
    Could the Segger J-Link support be updated to allow GEL files to be run on the ICEPick?

    Yes this is definitely one of the issues being investigated. We will also likely need different start up GEL files for CC26xx depending on the emulator type (J-Link vs XDS). Right now Segger has basic support with v6 but as you can see, there needs to be a lot of improvements - especially on CC26xx.

    Thanks

    ki

  • Also,

    Is there any way to enable clock cycle profiling with the Segger J-Link for CCS v6?  The option is grayed out for me and I am unable to activate any clock profiling.

  • Andy - If you using the CC2650, there is a known limitation with Cortex M devices where there is no profile clock support. This affects all debug probes, not just J-Link. There is a workaround on XDS based emulators where you can use the event counter to count cycles. However this is not supported with J-Link yet.
  • Thank you for the information. Now I am just using the XDS built into the DK.

    At some point, I ran into a problem where I made some code change and the JLink would no longer work at all. Programming, mass erase, even just connecting wouldn't complete successfully. Once I got the DK, I was able to use the XDS to reload firmware and once I took out the problem code I could then get the Jlink to work again.

  • Ki-Soo Lee said:
    If you using the CC2650, there is a known limitation with Cortex M devices where there is no profile clock support.

    With the Cortex-M4F based TM4C129 series one work-around was to use a GEL script to read the Data Watchpoint and Trace (DWT) Cycle Counter - see https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/420583/1499197#1499197. As the GEL script just read/writes the memory addresses for the Data Watchpoint and Trace (DWT) registers it may also work with J-Link.

    [Haven't tested this myself]