TMS570LS1227: SEGGER J-Link Usage with Cortex-R

Part Number: TMS570LS1227
Other Parts Discussed in Thread: CCSTUDIO

Hello,

 

I am shifting from the XDS100V2 to the Segger Jlink Pro (ethernet) for debugging, but am having some issues getting it working with CCS.

 

I can connect to the debugger through CCS with no additional JLinkScript files used, but consistently get "Break at address 0x0" and cannot meaningfully debug without power-cycling the TMS570.  Even so, I am unable to read memory or variables without pausing execution (as described here: TMS570LS1227 debug with SEGGER's JLINK - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums ).

I've followed the segger documentation for integration with Code Composer Studio, to include the inclusion of the ECC initialization skip script provided (see link below):

  1. TI Code Composer Studio - SEGGER Knowledge Base
  2. TI TMS570Lx - SEGGER Knowledge Base

    1. kb.segger.com/images/7/70/TI_TMS570Lx_SkipECCInit.JLinkScript

I have used the V9.80 and V7.98 JLink Drivers with little discernable difference in outcome.  When I specify the provided JLinkScript file that skips ECC initialization (to achieve my goal of connecting to the running target), I get a error that indicates a target endianness mismatch (this is not a true error).

For transparency, I have been seemingly unable to add JLink through the CCS package manager.  I get similar issues to here:  https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/923260/ccs-adding-j-link-debugger-to-ccs  I seem to have been able to get around this by replacing the dll directly in code composer studio with the up to date version from SEGGER.      

I (and several coworkers) tried this on CCS 10.4, 12.8, and 11.0 with similar results.

Do you have any advice on how to proceed?  

 

 

  • Hi Jacob,

    I never came across this issue before, on first level could you please verify below of our internal AI suggestions:

    Issue 1: "Break at Address 0x0" on Connect

    This is almost always caused by one of the following:

    Root Cause A: ECC Initialization Conflict

    The TMS570LS1227 runs a hardware ECC initialization routine in ROM before reaching your code. The J-Link interrupts this and lands at 0x0.

    Fix - Verify your JLinkScript is actually being loaded:

    // In CCS Debug Configuration:
    // Target > J-Link > JLinkScript file field
    // Confirm the FULL absolute path is specified, not relative
    // e.g., C:/JLink/Scripts/TI_TMS570Lx_SkipECCInit.JLinkScript
    Check the J-Link log output in CCS console for:
    Script: Found and executed

    If you do NOT see this, the script is silently failing to load.

    Root Cause B: Reset Handling Misconfiguration

    In your CCS Debug Configuration, verify these settings under Target > Reset Configuration:

    Setting
    Recommended Value
    Reset Type
    Core Reset (not System Reset)
    Reset at connect
    Disabled initially for live debug
    Halt after reset
    Disabled for connect-to-running

    Issue 2: Endianness Mismatch Error When Using JLinkScript

    This is the key issue and is likely masking everything else.

    What's Actually Happening

    The TMS570LS1227 is a big-endian Cortex-R4F. The J-Link drivers sometimes misidentify endianness when a JLinkScript modifies the connection sequence.

    Verify your .ccxml target configuration:

    <!-- In your .ccxml file, confirm this exists -->
    <property id="com.ti.ccstudio.debug.endianness" value="big"/>

    JLinkScript Endianness Declaration

    The provided SEGGER script may be missing or have an incorrect endianness declaration. Open TI_TMS570Lx_SkipECCInit.JLinkScript and verify/add:

    // At the top of the JLinkScript file
    int InitTarget(void) {
    // Explicitly declare big-endian
    JLINK_ExecCommand("SetEndian big");
    // ... rest of ECC skip code
    return 0;
    }

    If the script does not contain this, add it as the first line of InitTarget().


    Issue 3: Cannot Read Memory/Variables Without Halting

    This is a real-time memory access limitation with the J-Link on TMS570.

    Enable DAP-Based Non-Intrusive Access

    In CCS Debug Configuration under J-Link settings:

    Enable "Non-intrusive (SWO/SWV)" → Disabled (TMS570 doesn't support SWO)
    Enable "Allow memory access during run" → Check if available

    Alternative: Use ARMV7 DAP Directly

    In your .ccxml, try forcing the connection through DAP:

    <connection id="ARMV7_0_DAP">
    <property id="com.ti.ccstudio.endianness" value="big"/>
    </connection>

    Note: The TMS570LS1227 does NOT support true run-time memory access without the ETM/ETB infrastructure being configured. This is a silicon limitation, not a J-Link limitation. The XDS100V2 had the same restriction but handled it differently through TI's proprietary ICEPICK router.


    Issue 4: CCS Package Manager Failure / Manual DLL Replacement

    This is likely the root cause of several downstream issues.

    Proper Manual Integration Steps

    Rather than replacing the DLL directly (which causes version conflicts), do the following:

    Step 1: Install J-Link software from SEGGER separately
    Step 2: In CCS, go to:

    Window > Preferences > Code Composer Studio > Debug > GDB SEGGER J-Link Debugging

    Step 3: Point CCS to the installed J-Link directory explicitly:

    C:/Program Files/SEGGER/JLink_V798/

    Step 4: Do NOT mix DLLs between CCS internal versions and SEGGER installed versions. Remove any manually placed DLLs from:

    [CCS Install]/ccs/ccs_base/DebugServer/drivers/

    Recommended Complete Debug Configuration

    Connection: SEGGER J-Link
    Device: TMS570LS1227ZWT ← Verify exact part suffix
    Interface: JTAG
    Interface Speed: 1000 kHz (start low, increase after stable)
    JLinkScript: [full path]/TI_TMS570Lx_SkipECCInit.JLinkScript
    Reset: Core Reset
    Halt on connect: NO (for connect-to-running)
    Recommended Troubleshooting Sequence
    1. Remove all manually placed DLLs from CCS directories
    2. Reinstall J-Link V7.98 cleanly from SEGGER
    3. Point CCS Preferences to the SEGGER install directory
    4. Create a fresh .ccxml using CCS Target Configuration editor
    5. Add SetEndian big to JLinkScript InitTarget()
    6. Set Interface Speed to 1000 kHz
    7. Disable all reset-on-connect options
    8. Connect and check J-Link log for script execution confirmation

    If All Else Fails: J-Link GDB Server Approach

    Bypass CCS's J-Link integration entirely:

    # Launch J-Link GDB Server manually
    JLinkGDBServer.exe -device TMS570LS1227 -endian big \
    -if JTAG -speed 1000 -scriptfile TI_TMS570Lx_SkipECCInit.JLinkScript
    # Then connect CCS to localhost:2331 via GDB
    This isolates whether the issue is CCS integration or the J-Link connection itself.
    --
    Thanks & regards,
    Jagadish.